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

division by 0 error #11

Open
RyukAD opened this issue May 8, 2021 · 2 comments
Open

division by 0 error #11

RyukAD opened this issue May 8, 2021 · 2 comments

Comments

@RyukAD
Copy link

RyukAD commented May 8, 2021

Hi, Im running the test command

python3 test.py --dataset B100

and it gives the following error :

Traceback (most recent call last):
File "test.py", line 108, in
main()
File "test.py", line 104, in main
print('Average PSNR: %.4f' %(psnr_avr/len(hr_paths)))
ZeroDivisionError: division by zero

any help would be appreciated

@RyukAD
Copy link
Author

RyukAD commented May 8, 2021

Also all the images get blurry after your model does its thing. Enhancement?

@mimikyudesu
Copy link

Also all the images get blurry after your model does its thing. Enhancement?

Hi, I'm also running this code, and have this problem
I found a small bug in the test.py
At line 94 of test.py
[sr] = sess.run([t_sr], {t_lr: lr, t_hr: hr})
it set t_lr as the image which downsampling with hr, that make the result of FEQE would be more blurry than before.
In addition, there is no need to do vgg during test, which means you don't need t_hr.
You can just change
[sr] = sess.run([t_sr], {t_lr: lr, t_hr: hr})
to
[sr] = sess.run([t_sr], {t_lr: hr})
that would output what you want.
Hope this can help you.

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

2 participants