-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vgg16_features.load_state_dict(torch.load(vgg_path), strict=False) #10
Comments
Have you tried redownloading the vgg weights?
…On Mon, Feb 3, 2020, 10:02 PM Fabio Vianello ***@***.***> wrote:
I have no issues with stylize.py (with pretrained models). My problem is
with train.py. I think I followed the instructions: downloaded
vgg16-00b39a1b.pth, downloaded train2014, installed pytorch, opencv, etc
(installed with conda).
I have Debian 11 stable, Python 3.7.4, pytorch 1.4.0, torchvision 0.5.0,
cudatoolkit 10.1.243.
$ python train.py
Traceback (most recent call last):
File "train.py", line 168, in <module>
train()
File "train.py", line 50, in train
VGG = vgg.VGG16().to(device)
File "/home/mrfabiolo/style_transfer/fast-neural-style-pytorch/vgg.py", line 33, in __init__
vgg16_features.load_state_dict(torch.load(vgg_path), strict=False)
File "/home/mrfabiolo/miniconda3/lib/python3.7/site-packages/torch/serialization.py", line 529, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/mrfabiolo/miniconda3/lib/python3.7/site-packages/torch/serialization.py", line 692, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.
Same problem with device = "cpu" or device = "cuda". I got a GeForce GTX
750 card.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10?email_source=notifications&email_token=AB3NRXJOWZTPFVKQQICZ3NDRBAIX3A5CNFSM4KPEZMEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IKSXDVA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3NRXJACJFRHWE3VK47GW3RBAIX3ANCNFSM4KPEZMEA>
.
|
Oh, i'm stupid. I simply clicked "save as" on the .pth link. But if I open it on the browser I get:
Do I need to sign up to amazonaws.com or something? Is it free? |
Seems like Justin Johnson has already stopped hosting the vgg weights. I've uploaded it in my Google Drive. Here's the link: https://drive.google.com/file/d/1a0sFcNEvmIy21PE0yp7tzJuU0vhhV0Ln/view?usp=sharing Let me know if it works or not. |
Yes! It works, thanks man |
I have no issues with stylize.py (with pretrained models). My problem is with train.py. I think I followed the instructions: downloaded vgg16-00b39a1b.pth, downloaded train2014, installed pytorch, opencv, etc (installed with conda).
I have Debian 11 stable, Python 3.7.4, pytorch 1.4.0, torchvision 0.5.0, cudatoolkit 10.1.243.
Same problem with
device = "cpu"
ordevice = "cuda"
. I got a GeForce GTX 750 card.The text was updated successfully, but these errors were encountered: