Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

black-puppydog
Copy link

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 with net.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?

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
@black-puppydog
Copy link
Author

hmmmm... I pushed some other changes that shouldn't go into this repo, or at least into a different file...
Don't merge this yet, I should clean that up first.
But some of these changes might be nice to have indeed, since they make the whole thing (a little) faster by avoiding recomputation of features.

@black-puppydog
Copy link
Author

@eridgd yeah @sunshineatnoon did a great job with this one.
mind you that if you use my branch (as used for this pull request) you're automatically using a slightly modified parametrization, replacing the alpha parameter from the WCT paper with gamma and delta.

black-puppydog and others added 2 commits December 14, 2022 11:13
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"
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

Successfully merging this pull request may close these issues.

None yet

2 participants