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

I am running this code in python3.7 #18

Open
343695222 opened this issue Aug 20, 2019 · 1 comment
Open

I am running this code in python3.7 #18

343695222 opened this issue Aug 20, 2019 · 1 comment

Comments

@343695222
Copy link

Traceback (most recent call last):
File "test_GFN_4x.py", line 131, in
model_test(model)
File "test_GFN_4x.py", line 101, in model_test
test(testloader, model, criterion, SR_dir)
File "test_GFN_4x.py", line 91, in test
print("Avg. SR PSNR:{:4f} dB".format(avg_psnr / iteration))
UnboundLocalError: local variable 'iteration' referenced before assignment

@343695222
Copy link
Author

Testing on the given 3-step trained model which stores in /models, and ends with pkl.
Testing model is GFN_epoch_55.pkl----------------------------------
D:\Anaconda3\lib\site-packages\torch\serialization.py:453: SourceChangeWarning: source code of class 'torch.nn.modules.container.Sequential' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
D:\Anaconda3\lib\site-packages\torch\serialization.py:453: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
D:\Anaconda3\lib\site-packages\torch\serialization.py:453: SourceChangeWarning: source code of class 'torch.nn.modules.activation.LeakyReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
D:\Anaconda3\lib\site-packages\torch\serialization.py:453: SourceChangeWarning: source code of class 'torch.nn.modules.activation.ReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
D:\Anaconda3\lib\site-packages\torch\serialization.py:453: SourceChangeWarning: source code of class 'torch.nn.modules.conv.ConvTranspose2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
D:\Anaconda3\lib\site-packages\torch\serialization.py:453: SourceChangeWarning: source code of class 'torch.nn.modules.pixelshuffle.PixelShuffle' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
D:\Anaconda3\lib\site-packages\torch\nn_reduction.py:43: UserWarning: size_average and reduce args will be deprecated, please use reduction='mean' instead.
warnings.warn(warning.format(ret))
Namespace(dataset='C:\Users\陈东祥\Desktop\GFN\GFN\GOPRO_Large\Validation_4x', gated=True, intermediate_process='', isTest=True, scale=4)
Traceback (most recent call last):
File "test_GFN_4x.py", line 131, in
model_test(model)
File "test_GFN_4x.py", line 101, in model_test
test(testloader, model, criterion, SR_dir)
File "test_GFN_4x.py", line 91, in test
print("Avg. SR PSNR:{:4f} dB".format(avg_psnr / iteration))
UnboundLocalError: local variable 'iteration' referenced before assignment

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

1 participant