Skip to content

Commit

Permalink
Temporary fix for PyTorch 403 error.
Browse files Browse the repository at this point in the history
  • Loading branch information
n2cholas committed Aug 11, 2021
1 parent 2eb47a4 commit 43f4119
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jax_resnet/pretrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

try:
import torch

# https://github.com/pytorch/vision/issues/4156#issuecomment-894768539
torch.hub._validate_not_a_forked_repo = lambda *_: True # type: ignore
torch_exists = True
except ImportError:
torch_exists = False
Expand Down

0 comments on commit 43f4119

Please sign in to comment.