PytorchWCT
PytorchWCT copied to clipboard
Migrate to Pytorch 1.0
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?
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.
@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
.