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

local variable 'mean_errors' referenced before assignment #16

Open
hanyanghong86 opened this issue Mar 9, 2021 · 2 comments
Open

local variable 'mean_errors' referenced before assignment #16

hanyanghong86 opened this issue Mar 9, 2021 · 2 comments

Comments

@hanyanghong86
Copy link

Hi, I ran torchrun.py using the argument python torchrun.py -train=False -test=True -pd=data/images/AFLW2000 --loadModelPath=savedmodel/temp_best_model/2019-11-18-12-34-19/best.pth and get this error:
UnboundLocalError: local variable 'mean_errors' referenced before assignment
Can you help me figure this out? Thanks for respond!

@hanyanghong86
Copy link
Author

Specifically:
Traceback (most recent call last):
File "/home/hyh/face/reconstruction/PRNet-PyTorch/torchrun.py", line 332, in
net_manager.test(error_func_list=run_args.errorFunction, is_visualize=run_args.isVisualize)
File "/home/hyh/face/reconstruction/PRNet-PyTorch/torchrun.py", line 262, in test
print(error_func_list[i], mean_errors[i])
UnboundLocalError: local variable 'mean_errors' referenced before assignment

@rakacendekia
Copy link

Specifically:
Traceback (most recent call last): File "/home/hyh/face/reconstruction/PRNet-PyTorch/torchrun.py", line 332, in net_manager.test(error_func_list=run_args.errorFunction, is_visualize=run_args.isVisualize) File "/home/hyh/face/reconstruction/PRNet-PyTorch/torchrun.py", line 262, in test print(error_func_list[i], mean_errors[i]) UnboundLocalError: local variable 'mean_errors' referenced before assignment

Hey, have you found a solution to this problem?

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