reshow/PRNet-PyTorch

local variable 'mean_errors' referenced before assignment

Opened this issue · 2 comments

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!

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

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?