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

Report the error:UnboundLocalError #2

Open
SER1205 opened this issue Jun 27, 2023 · 1 comment
Open

Report the error:UnboundLocalError #2

SER1205 opened this issue Jun 27, 2023 · 1 comment

Comments

@SER1205
Copy link

SER1205 commented Jun 27, 2023

Hello, I report the error when running the program:
Traceback (most recent call last):
File "pose_estimation/train.py", line 370, in
main()
File "pose_estimation/train.py", line 306, in main
final_output_dir, tb_log_dir, writer_dict, last_epoch_model)
File "/SSPCM-main/SSPCM/pose_estimation/../lib/core/function.py", line 71, in train
output = model(input, target_weight, optimizer, epoch, unsup_ht1_l, unsup_ht2_l)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward
return self.module(*inputs[0], **kwargs[0])
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/SSPCM-main/SSPCM/pose_estimation/../lib/models/my_pose_triple.py", line 592, in forward
preds_ensemble, _ = get_max_preds_tensor(ensemble_unsup_ht.detach())
UnboundLocalError: local variable 'ensemble_unsup_ht' referenced before assignment

I will be very grateful if you can reply!

@KangqingYe
Copy link

Encountered the same error. Changed "if epoch > self.cfg.time_correction_warmup_epoch" to "if epoch >= self.cfg.time_correction_warmup_epoch".

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