deep-image-prior
deep-image-prior copied to clipboard
Error when loading pretrained vgg and alexnet
When loading pretrained vgg and alexnet in python 3.6:
'ascii' codec can't decode byte 0xc3 in position 875: ordinal not in range(128)
How did you load pretrained vgg or alexnet?
I tried to load vgg16 for preceptual loss in SR :). And it works well. Here is my method:
# python2.7
import torchvision.models as models
vgg = models.vgg16(pretrained=True).features # except the classification layers
Although my python version is 2.7, but i think it's probably ok in 3. You may look here or here for some ideas.
I've converted VGG-19 and Alexnet from Caffe to Torch7 and then to Pytorch. Did so because other papers use these nets pretrained with Caffe.
Models from pytorch's torchvision are different to the reference models, yet it is ok to use them if your aim is not to compare to other works.
Hi, have you made the code snippet converting caffe to pytorch available somewhere? thanks