-
Notifications
You must be signed in to change notification settings - Fork 99
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
Migrate to Pytorch 1.0 #16
base: master
Are you sure you want to change the base?
Conversation
use torch.no_grad() instead of volatile variables. update example images to also use relu5_1 stylization. Point models download to new file. Remove model conversion script. add .gitignore
140d2e3
to
bb093b9
Compare
hmmmm... I pushed some other changes that shouldn't go into this repo, or at least into a different file... |
@eridgd yeah @sunshineatnoon did a great job with this one. |
The pascal server can't really be relied on long-term. This is not great form, but the models are a mere 120MB so this is workable, and since the repo is pretty much dormant I don't see a reason to go through more trouble.
since they're now included in the repo, no need to confuse users with "you need the models"
This takes the code all the way to pytorch 1.0:
I had to migrate the encoder/decoder models since
load_lua
seems to have been removed from the API (?!) and while I was at it I also combined all the encoders into one, which saves a little bit of RAM and makes the file much more usable. So all those 6 models are now standard.pth.tar
files to be used withnet.load_state_dict(torch.load(filename))
.I changed all the models with a custom script (see intermediate commit) that can only be run with pytorch 0.4.1 then switched everything to those models and deleted the conversion script and the old model definitions.
On top of that I had to make some small changes to make the transition to the unified Tensor/Variable classes.
I also updated
Readme.md
to point at a zip file I prepared with the new models, of course that can be changed if you want to put this on google drive again.And I updated the example images, since you didn't do that when you included layer 5 into the model. I know you prefer the output without relu5_1, but I think keeping the visuals and the code consistent makes sense, no?