Skip to content

Pretrained VGG models #28

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

Closed
jcjohnson opened this issue Jan 18, 2017 · 9 comments
Closed

Pretrained VGG models #28

jcjohnson opened this issue Jan 18, 2017 · 9 comments

Comments

@jcjohnson
Copy link

Is there any plan for pretrained VGG models, especially VGG16 or VGG19? These are needed for style transfer; AlexNet and ResNets tend not to work as well in my experience.

@colesbury
Copy link
Member

Yes, I'll train them this week or grab some weights from another framework.

@jcjohnson
Copy link
Author

I've converted Karen Simonyan's VGG-16 and VGG-19 models here:

https://github.com/jcjohnson/pytorch-vgg

The converted models are available here:

VGG-16: https://s3-us-west-2.amazonaws.com/jcjohns-models/vgg16-00b39a1b.pth

VGG-19: https://s3-us-west-2.amazonaws.com/jcjohns-models/vgg19-d01eb7cb.pth

These are exact conversions of Karen's Caffe checkpoints, so they expect BGR images in the range [0, 255] with the BGR value [103.939, 116.779, 123.68] subtracted from each pixel; I suspect that this is different from the pretrained AlexNet and ResNets in the model zoo.

Feel free to add them to the model zoo if you want, but it would be convenient if all pretrained models used the same preprocessing.

@soumith
Copy link
Member

soumith commented Jan 22, 2017

nice. sam is training new ones (he finally got them to start converging on friday) and he wants to commit newly trained ones into the zoo.
He wants to do it for reproducibility, where the model definition in torchvision.models if trained from scratch, will be guaranteed to get to the same approx place as where the pre-trained model is.

@jcjohnson
Copy link
Author

@soumith Having the official model zoo consist of things trained from scratch seems like a good policy. I was mostly just impatient and wanted to use VGG networks this weekend.

@skrish13
Copy link
Contributor

skrish13 commented Feb 9, 2017

Any idea when we can expect pre-trained models for VGG?

@colesbury
Copy link
Member

I trained VGG, but got below state of the art results (I think due to the weight initialization). I'll try changing the weight initialization and retraining.

@HarshaVardhanP
Copy link

HarshaVardhanP commented Feb 14, 2017

follow up : when can we expect VGG16 pretrained model in PyTorch model zoo ? Thanks

@soumith
Copy link
Member

soumith commented Feb 15, 2017

in a few more days, probably a week. @colesbury is training them again.

@colesbury
Copy link
Member

Pre-trained VGG models are now available in master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants