You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deer TropComplique:
When I run train.py, a TypeError arised like:
INFO:tensorflow:Using config: {'_num_ps_replicas': 0, '_tf_random_seed': None, '_save_checkpoints_steps': None, '_model_dir': '/home/dan/work/light-head-rcnn/models/run01/', '_keep_checkpoint_every_n_hours': 10000, '_is_chief': True, '_task_type': 'worker', '_log_step_count_steps': 100, '_save_summary_steps': 200, '_master': '', '_task_id': 0, '_session_config': gpu_options {
visible_device_list: "0"
}
, '_service': None, '_num_worker_replicas': 1, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7f67bdd7c6a0>, '_keep_checkpoint_max': 5, '_save_checkpoints_secs': 600}
INFO:tensorflow:Running training and evaluation locally (non-distributed).
INFO:tensorflow:Start train and evaluate loop. The evaluate will happen after 3600 secs (eval_spec.throttle_secs) or training is finished.
Traceback (most recent call last):
File "/home/lianji/light-head-rcnn-master/train.py", line 68, in
tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/training.py", line 430, in train_and_evaluate
executor.run_local()
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/training.py", line 609, in run_local
hooks=train_hooks)
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py", line 302, in train
loss = self._train_model(input_fn, hooks, saving_listeners)
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py", line 711, in _train_model
features, labels, model_fn_lib.ModeKeys.TRAIN, self.config)
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py", line 694, in _call_model_fn
model_fn_results = self._model_fn(features=features, **kwargs)
File "/home/lianji/light-head-rcnn-master/model.py", line 25, in model_fn
detector = Detector(features['images'], feature_extractor, is_training, params)
TypeError: 'PrefetchDataset' object is not subscriptable
Can you tell me how can solve it?
The text was updated successfully, but these errors were encountered:
deer TropComplique:
When I run train.py, a TypeError arised like:
INFO:tensorflow:Using config: {'_num_ps_replicas': 0, '_tf_random_seed': None, '_save_checkpoints_steps': None, '_model_dir': '/home/dan/work/light-head-rcnn/models/run01/', '_keep_checkpoint_every_n_hours': 10000, '_is_chief': True, '_task_type': 'worker', '_log_step_count_steps': 100, '_save_summary_steps': 200, '_master': '', '_task_id': 0, '_session_config': gpu_options {
visible_device_list: "0"
}
, '_service': None, '_num_worker_replicas': 1, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7f67bdd7c6a0>, '_keep_checkpoint_max': 5, '_save_checkpoints_secs': 600}
INFO:tensorflow:Running training and evaluation locally (non-distributed).
INFO:tensorflow:Start train and evaluate loop. The evaluate will happen after 3600 secs (eval_spec.throttle_secs) or training is finished.
Traceback (most recent call last):
File "/home/lianji/light-head-rcnn-master/train.py", line 68, in
tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/training.py", line 430, in train_and_evaluate
executor.run_local()
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/training.py", line 609, in run_local
hooks=train_hooks)
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py", line 302, in train
loss = self._train_model(input_fn, hooks, saving_listeners)
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py", line 711, in _train_model
features, labels, model_fn_lib.ModeKeys.TRAIN, self.config)
File "/home/lianji/anaconda2/envs/shufflenetv2/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py", line 694, in _call_model_fn
model_fn_results = self._model_fn(features=features, **kwargs)
File "/home/lianji/light-head-rcnn-master/model.py", line 25, in model_fn
detector = Detector(features['images'], feature_extractor, is_training, params)
TypeError: 'PrefetchDataset' object is not subscriptable
Can you tell me how can solve it?
The text was updated successfully, but these errors were encountered: