Closed eastchun closed 4 years ago
I'm getting the same error.
Let me see it. I haven't come across this problem before. Looking at the problem seems that the test loader has zero images.
How to adapt pytorch 1.0?
The model works fine with PyTorch 0.4.0 and 0.4.1
The framework is not compatiable with PyTorch 1.0
I will try to update it to the recent PyTorch versions. But it may not be soon enough.
self.ckp.log[-1, idx_scale] = eval_acc / len(self.loader_test) ZeroDivisionError: division by zero
Hi @saeed-anwar, can you please describe how to setup a new (minimal) ubuntu environment in order to reproduce your results? Maybe you can recommend/test a docker image that will work with your script?
Hi @saeed-anwar, 1) I got your model running on "floydhub/pytorch:0.4.1-py3.39" docker image with "--cpu" option. 2) The result from my test image, taken with webcam, shows that the webcam noise is removed by running the model twice. 3) Can I modify strength of the noise removal by your model?
I am facing this issue with PyTorch 0.4.1 --> how could I fix this?
This error can be fixed by replacing all instances of misc.imread
and misc.imwrite
with imageio.imread
and imageio.imwrite
, respectively. And adding import imageio
to all affected files.
As an explanation: the author most likely used scipy <= v1.2.0 after which imread/write was removed (see https://docs.scipy.org/doc/scipy-1.2.1/reference/generated/scipy.misc.imread.html)
Did anyone run the suggested script correctly? Why do I get the following error?