Skip to content

local variable 'mean_errors' referenced before assignment #16

Open

Description

@hanyanghong86

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!

Activity

  1. hanyanghong86 commented on Mar 10, 2021

    @hanyanghong86
    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

  2. rakacendekia commented on Mar 21, 2021

    @rakacendekia

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions