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

error msg. #6

Closed
eastchun opened this issue Sep 23, 2019 · 9 comments
Closed

error msg. #6

eastchun opened this issue Sep 23, 2019 · 9 comments

Comments

@eastchun
Copy link

eastchun commented Sep 23, 2019

Did anyone run the suggested script correctly?
Why do I get the following error?

Making model...
Loading model from ../experiment/ridnet.pt

Evaluation:
0it [00:00, ?it/s]
Traceback (most recent call last):
  File "main.py", line 20, in <module>
    while not t.terminate():
  File "C:\test\RIDNet-pytorch\TestCode\code\trainer.py", line 139, in terminate
    self.test()
  File "C:\test\RIDNet-pytorch\TestCode\code\trainer.py", line 110, in test
    self.ckp.log[-1, idx_scale] = eval_acc / len(self.loader_test)
ZeroDivisionError: division by zero
@mmazeika
Copy link

I'm getting the same error.

@saeed-anwar
Copy link
Owner

Let me see it. I haven't come across this problem before. Looking at the problem seems that the test loader has zero images.

@juingzhou
Copy link

How to adapt pytorch 1.0?

@saeed-anwar
Copy link
Owner

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.

@juingzhou
Copy link

self.ckp.log[-1, idx_scale] = eval_acc / len(self.loader_test)
ZeroDivisionError: division by zero

@MariasStory
Copy link

MariasStory commented Sep 26, 2019

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?

@MariasStory
Copy link

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?

@nelaturuharsha
Copy link

I am facing this issue with PyTorch 0.4.1 --> how could I fix this?

@kmuw
Copy link

kmuw commented Mar 4, 2022

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)

@kmuw kmuw mentioned this issue Mar 4, 2022
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

No branches or pull requests

7 participants