vgg16.t7 unhashable type: 'numpy.ndarray
hi
I have put the vgg16.t7 into models folder, it's been detected correctly. However, the following problem happened.
Traceback (most recent call last):
File "main.py", line 295, in
It does't work for pytorch-1.0.0 and 1.4.0, and giving the same error, how to deal with it? thanks !
The VGG model is no longer compatible with recent PyTorch version, but you can still use the pretrained MSG-Net.
hello, I deal with above problem by loading vgg16.pth that convert the pretrained caffe model of vgg16 to pytorch vgg16.pth,
however, geting the following problem.
Traceback (most recent call last):
File "main.py", line 299, in
how to deal with? thanks.
Looks like just cpu and gpu mismatch.
You may fix that easily, similar to x = x.gpu()
thank you for your ideal!
I solve the problem. check the device's type of mean and batch by printing , I found that mean'data is caculated on CPU and batch'data on GPU. so, It works by modifying batch - Variable(mean) to batch - Variable(mean).cuda(0)
Thanks for the feedback! Could you send a PR to fix it?
of course
However, the speed is very slow when I run the modified code, as follow:
Wed Aug 12 16:04:44 2020 Epoch 1: [2000/123287] content: 1.976768 style: 13.847776 total: 15.824544: 0%|
Wed Aug 12 16:08:23 2020 Epoch 1: [4000/123287] content: 1.926269 style: 10.780033 total: 12.706302: 0%|
Don't understand why,What is your speed during training?
Shouldn't be that slow. Something may be wrong.
The VGG model is no longer compatible with recent PyTorch version, but you can still use the pretrained MSG-Net.
How do you "Train Your Own MSG-Net Model" then? When i follow instructions, the VGG model is needed. How can I train my own MSG-Net Model without VGG model? Using .pth instead isn't working with the provided code. Throws T7ReaderException.
Can you give some advices? I'm new to this topic and appreciate your help!
This code was written in early stage of PyTorch. Now you may use the official VGG-Net at https://pytorch.org/hub/pytorch_vision_vgg/
This code was written in early stage of PyTorch. Now you may use the official VGG-Net at https://pytorch.org/hub/pytorch_vision_vgg/
thank you, I rewrote the method of loading the VGG pre-trained model, now I am optimizing training speed and improving image generation quality
The VGG model is no longer compatible with recent PyTorch version, but you can still use the pretrained MSG-Net.
I can't find pretrained MSG-Net model. How to download this model??
https://github.com/zhanghang1989/PyTorch-Multi-Style-Transfer/blob/master/experiments/models/download_model.sh#L2
Run it on GPU. I meet this problem when I run the code on CPU.