models icon indicating copy to clipboard operation
models copied to clipboard

train error when I added the FLAGS hparams_overrides

Open lighTQ opened this issue 7 years ago • 3 comments

When I added the --hparams_overrides parameter when I used the tensorflow object detection API training, I reported the following error.

ERROR info:

Traceback (most recent call last): File "object_detection/model_main.py", line 109, in tf.app.run() File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "object_detection/model_main.py", line 66, in main hparams=model_hparams.create_hparams(FLAGS.hparams_overrides), File "/software/models/research/object_detection/model_hparams.py", line 43, in create_hparams hparams = hparams.parse(hparams_overrides) File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/training/python/training/hparam.py", line 542, in parse values_map = parse_values(values, type_map) File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/training/python/training/hparam.py", line 263, in parse_values raise ValueError('Unknown hyperparameter type for %s' % name) ValueError: Unknown hyperparameter type for label_map_path

executed scripts is: python object_detection/model_main.py --pipeline_config_path=${PIPELINE_CONFIG_PATH} --model_dir=${MODEL_DIR} --num_train_steps=${NUM_TRAIN_STEPS} --sample_1_of_n_eval_examples=$SAMPLE_1_OF_N_EVAL_EXAMPLES --hparams_overrides='label_map_path=/home/pycharm_pj382/Datasets/tmp/label_map.pbtxt'

lighTQ avatar Jan 21 '19 08:01 lighTQ

when I added some code in the model_hparams.py, It worked hparams = tf.contrib.training.HParams( # Whether a fine tuning checkpoint (provided in the pipeline config) # should be loaded for training. batch_size= 1, label_map_path='', load_pretrained=True)

lighTQ avatar Jan 21 '19 08:01 lighTQ

Thanks @lighTQ ! I have also found a list of hyperparamter available here: https://github.com/tensorflow/models/blob/master/research/object_detection/utils/config_util.py#L494

WonderAndMaps avatar Jan 23 '19 00:01 WonderAndMaps

Hi There, We are checking to see if you still need help on this, as this seems to be an old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.

tensorflowbutler avatar Mar 18 '20 21:03 tensorflowbutler