Closed iminfine closed 5 years ago
I only run the parameter tuning process of pretrained SiamFCRes22 model with OTB2015 and got the error message:
Traceback (most recent call last): File "siamese_tracking/onekey_fc.py", line 101, in <module> main() File "siamese_tracking/onekey_fc.py", line 92, in main 2>&1 | tee logs/tpe_tune_fc.log'.format(trainINFO['MODEL'], 'snapshot/'+ resume, tuneINFO['DATA'], (len(info['GPUS']) + 1) // 2)) UnboundLocalError: local variable 'resume' referenced before assignment.
Could you please to tell me what can I do to avoid this error?
It's so clear that there is no tune_tpe_fc.log
in your logs
directory. You can change resume
to checkpoint_e30.pth
(or any trained model you want) . Understand the code structure first and make better use of it.
I only run the parameter tuning process of pretrained SiamFCRes22 model with OTB2015 and got the error message:
Traceback (most recent call last): File "siamese_tracking/onekey_fc.py", line 101, in <module> main() File "siamese_tracking/onekey_fc.py", line 92, in main 2>&1 | tee logs/tpe_tune_fc.log'.format(trainINFO['MODEL'], 'snapshot/'+ resume, tuneINFO['DATA'], (len(info['GPUS']) + 1) // 2)) UnboundLocalError: local variable 'resume' referenced before assignment.
Could you please to tell me what can I do to avoid this error?It's so clear that there is no
tune_tpe_fc.log
in yourlogs
directory. You can changeresume
tocheckpoint_e30.pth
(or any trained model you want) . Understand the code structure first and make better use of it.
Thanks for your patience, I am a beginner of Python, just from MATLAB for almost 2 mouths.
Sorry to bother you again. I am now running the tuning process, it seems there might be some bugs existed. The error message is `== Status == Using AsyncHyperBand: num_stopped=0 Bracket: Iter 180.000: None | Iter 60.000: None | Iter 20.000: None Bracket: Iter 180.000: None | Iter 60.000: None Bracket: Iter 180.000: None Resources requested: 1/16 CPUs, 0.5/2 GPUs Memory usage on this node: 6.0/16.7 GB Result logdir: ./TPE_results/zp_tune PENDING trials:
2019-07-06 17:50:51,499 WARNING logger.py:105 -- Could not instantiate <class 'ray.tune.logger._TFLogger'> - skipping. 2019-07-06 17:50:51,630 WARNING logger.py:105 -- Could not instantiate <class 'ray.tune.logger._TFLogger'> - skipping. 2019-07-06 17:50:51,808 WARNING logger.py:105 -- Could not instantiate <class 'ray.tune.logger._TFLogger'> - skipping. 2019-07-06 17:50:51,859 WARNING logger.py:27 -- Couldn't import TensorFlow - disabling TensorBoard logging. 2019-07-06 17:50:51,873 WARNING logger.py:27 -- Couldn't import TensorFlow - disabling TensorBoard logging. 2019-07-06 17:50:51,965 WARNING logger.py:27 -- Couldn't import TensorFlow - disabling TensorBoard logging. 2019-07-06 17:50:52,138 WARNING logger.py:27 -- Couldn't import TensorFlow - disabling TensorBoard logging. 2019-07-06 17:51:09,995 ERROR function_runner.py:89 -- Runner Thread raised error. Traceback (most recent call last): File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/function_runner.py", line 86, in run self._entrypoint(*self._entrypoint_args) File "./siamese_tracking/tune_tpe.py", line 95, in fitness auc = auc_otb(tracker, model, model_config) File "/home/k1898460/SiamDW/siamese_tracking/test_siamfc.py", line 224, in auc_otb auc = eval_auc_tune(result_path, config['benchmark']) File "/home/k1898460/SiamDW/siamese_tracking/../lib/core/eval_otb.py", line 164, in eval_auc_tune center = convert_bb_to_center(bb) File "/home/k1898460/SiamDW/siamese_tracking/../lib/core/eval_otb.py", line 78, in convert_bb_to_center return np.array([(bboxes[:, 0] + (bboxes[:, 2] - 1) / 2), IndexError: too many indices for array 2019-07-06 17:51:10,997 ERROR trial_runner.py:413 -- Error processing event. Traceback (most recent call last): File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/trial_runner.py", line 378, in _process_events result = self.trial_executor.fetch_result(trial) File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/ray_trial_executor.py", line 228, in fetch_result result = ray.get(trial_future[0]) File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/worker.py", line 2132, in get raise value ray.worker.RayTaskError: ray_worker (pid=20724, host=nmscmo005910) File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/trainable.py", line 151, in train result = self._train() File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/function_runner.py", line 128, in _train result = self._status_reporter._get_and_clear_status() File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/function_runner.py", line 50, in _get_and_clear_status raise TuneError("Error running trial: " + str(self._error)) ray.tune.error.TuneError: Error running trial: too many indices for array ` Thanks for your patience again.
Sorry to bother you again. I am now running the tuning process, it seems there might be some bugs existed. The error message is `== Status == Using AsyncHyperBand: num_stopped=0 Bracket: Iter 180.000: None | Iter 60.000: None | Iter 20.000: None Bracket: Iter 180.000: None | Iter 60.000: None Bracket: Iter 180.000: None Resources requested: 1/16 CPUs, 0.5/2 GPUs Memory usage on this node: 6.0/16.7 GB Result logdir: ./TPE_results/zp_tune PENDING trials:
- fitness_2_scale_lr=0.536,scale_penalty=0.9618,scale_step=1.1712,w_influence=0.6653: PENDING
- fitness_3_scale_lr=0.4236,scale_penalty=0.9667,scale_step=1.0353,w_influence=0.4361: PENDING
- fitness_4_scale_lr=0.4821,scale_penalty=0.9941,scale_step=1.1189,w_influence=0.203: PENDING
- fitness_5_scale_lr=0.4843,scale_penalty=0.9575,scale_step=1.0566,w_influence=0.2369: PENDING RUNNING trials:
- fitness_1_scale_lr=0.1796,scale_penalty=0.957,scale_step=1.1024,w_influence=0.6571: RUNNING
2019-07-06 17:50:51,499 WARNING logger.py:105 -- Could not instantiate <class 'ray.tune.logger._TFLogger'> - skipping. 2019-07-06 17:50:51,630 WARNING logger.py:105 -- Could not instantiate <class 'ray.tune.logger._TFLogger'> - skipping. 2019-07-06 17:50:51,808 WARNING logger.py:105 -- Could not instantiate <class 'ray.tune.logger._TFLogger'> - skipping. 2019-07-06 17:50:51,859 WARNING logger.py:27 -- Couldn't import TensorFlow - disabling TensorBoard logging. 2019-07-06 17:50:51,873 WARNING logger.py:27 -- Couldn't import TensorFlow - disabling TensorBoard logging. 2019-07-06 17:50:51,965 WARNING logger.py:27 -- Couldn't import TensorFlow - disabling TensorBoard logging. 2019-07-06 17:50:52,138 WARNING logger.py:27 -- Couldn't import TensorFlow - disabling TensorBoard logging. 2019-07-06 17:51:09,995 ERROR function_runner.py:89 -- Runner Thread raised error. Traceback (most recent call last): File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/function_runner.py", line 86, in run self._entrypoint(*self._entrypoint_args) File "./siamese_tracking/tune_tpe.py", line 95, in fitness auc = auc_otb(tracker, model, model_config) File "/home/k1898460/SiamDW/siamese_tracking/test_siamfc.py", line 224, in auc_otb auc = eval_auc_tune(result_path, config['benchmark']) File "/home/k1898460/SiamDW/siamese_tracking/../lib/core/eval_otb.py", line 164, in eval_auc_tune center = convert_bb_to_center(bb) File "/home/k1898460/SiamDW/siamese_tracking/../lib/core/eval_otb.py", line 78, in convert_bb_to_center return np.array([(bboxes[:, 0] + (bboxes[:, 2] - 1) / 2), IndexError: too many indices for array 2019-07-06 17:51:10,997 ERROR trial_runner.py:413 -- Error processing event. Traceback (most recent call last): File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/trial_runner.py", line 378, in _process_events result = self.trial_executor.fetch_result(trial) File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/ray_trial_executor.py", line 228, in fetch_result result = ray.get(trial_future[0]) File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/worker.py", line 2132, in get raise value ray.worker.RayTaskError: ray_worker (pid=20724, host=nmscmo005910) File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/trainable.py", line 151, in train result = self._train() File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/function_runner.py", line 128, in _train result = self._status_reporter._get_and_clear_status() File "/home/k1898460/anaconda3/envs/siamDW/lib/python3.6/site-packages/ray/tune/function_runner.py", line 50, in _get_and_clear_status raise TuneError("Error running trial: " + str(self._error)) ray.tune.error.TuneError: Error running trial: too many indices for array ` Thanks for your patience again.
Solved by commenting out line 99, 104 and 164. These lines call convert_bb_to_center function but never use the calculated values.
I only run the parameter tuning process of pretrained SiamFCRes22 model with OTB2015 and got the error message:
Traceback (most recent call last): File "siamese_tracking/onekey_fc.py", line 101, in <module> main() File "siamese_tracking/onekey_fc.py", line 92, in main 2>&1 | tee logs/tpe_tune_fc.log'.format(trainINFO['MODEL'], 'snapshot/'+ resume, tuneINFO['DATA'], (len(info['GPUS']) + 1) // 2)) UnboundLocalError: local variable 'resume' referenced before assignment.
Could you please to tell me what can I do to avoid this error?