Closed Deerzh closed 1 year ago
Apologies for the slow reply, I hope you have figured this out by now! In case you haven't:
It looks like optimizer was not initialized. Perhaps you have phase set to something other than "train", causing these few lines to be skipped?
when I run this command: python train.py -e test_run_001 an error occurred, like this: Traceback (most recent call last): File "train.py", line 129, in
main()
File "train.py", line 125, in main
train(func, data_func, config)
File "train.py", line 96, in train
outs = train_func(batch_id + i, config, phase, **datas)
File "/home/zhang/compatibility_analysis/pytorch_stacked_hourglass/task/pose.py", line 140, in make_train
for param_group in optimizer.param_groups:
UnboundLocalError: local variable 'optimizer' referenced before assignment
I just modified 'train_iters': 1, 'valid_iters': 1, 'decay_iters': 1. Can you help me solved this problem?