sniklaus / 3d-ken-burns

an implementation of 3D Ken Burns Effect from a Single Image using PyTorch
Other
1.51k stars 224 forks source link

RuntimeError: view size is not compatible #33

Closed thesoulharmonic closed 4 years ago

thesoulharmonic commented 4 years ago

When I try and run the colab of this I'm getting and error on the final step of

Traceback (most recent call last): File "autozoom.py", line 76, in process_load(npyImage, {}) File "", line 10, in process_load File "", line 128, in disparity_refinement File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "", line 94, in forward RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

Do you know what this might be?

Thank you

skabbit commented 4 years ago

Got the same error on Google Colab run.

sniklaus commented 4 years ago

Which Colab are you using and what is the PyTorch version? Thanks!

thesoulharmonic commented 4 years ago

This is the Colab - https://colab.research.google.com/github/agmm/colab-3d-ken-burns/blob/master/automatic-3d-ken-burns.ipynb but it happens on the other 2 also.

skabbit commented 4 years ago

I tried all three Colabs listed in README. Google Colab Pro, Standart GPU runtime. I also tried to rollback to commit bde67588ff2b0247068fc2fe4419619d47e3a228, supposed trained network and code are unsynced, but still no luck.

skabbit commented 4 years ago

Tried c6e70de139e39ad1d25d8ad2dea2922826770e89 also, but got the same error.

sniklaus commented 4 years ago

I just pushed some changes that were necessary when using PyTorch 1.5, pleas try rerunning the Colab from the beginning.

thesoulharmonic commented 4 years ago

That seems to have fixed it for me. Thank you

sniklaus commented 4 years ago

I am happy to hear that, thank you for confirming!

skabbit commented 4 years ago

Yep, everything works now! Thank you!