speedplusbaseline
speedplusbaseline copied to clipboard
UnboundLocalError: local variable 'speed_q' referenced before assignment
Hi, I have trained the model; however, while running this code snippet below:
python test.py --pretrained 'checkpoints/krn/synthetic_only/model_best.pth.tar' \
--logdir 'log/krn/synthetic_only' --resultfn 'results.txt' \
--model_name 'krn' --input_shape 224 224 \
--test_domain 'synthetic' --test_csv 'validation.csv'
Got this error: speedplusbaseline/src/utils/metrics.py", line 66, in speed_score speed = speed_t + speed_q UnboundLocalError: local variable 'speed_q' referenced before assignment
I tried to track it, the condition in line 55 in metrics.py is not executing # Check if within threshold if applyThresh and err_q < rotThresh: speed_q = 0.0 This is because I am getting the value of err_q approximately 40.396.... Am I doing something wrong?
speed_r ->speed_q ?