Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: default_name type (<class 'list'>) is not a string type. When run train_ssd.py, I meet a TpyeError. #117

Open
CaptainKeer opened this issue Jul 25, 2019 · 10 comments

Comments

@CaptainKeer
Copy link

tensorflow 1.14 ,python3.5 ,cuda10.0, cudnn7.5.0

Traceback (most recent call last):
File "/home/wzy/SSD.TensorFlow-master/train_ssd.py", line 464, in
tf.app.run()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.5/dist-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/lib/python3.5/dist-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "/home/wzy/SSD.TensorFlow-master/train_ssd.py", line 460, in main
hooks=[logging_hook], max_steps=FLAGS.max_number_of_steps)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 367, in train
loss = self._train_model(input_fn, hooks, saving_listeners)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 1158, in _train_model
return self._train_model_default(input_fn, hooks, saving_listeners)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 1185, in train_model_default
input_fn, ModeKeys.TRAIN))
File "/usr/local/lib/python3.5/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 1022, in get_features_and_labels_from_input_fn
self.call_input_fn(input_fn, mode))
File "/usr/local/lib/python3.5/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 1113, in call_input_fn
return input_fn(**kwargs)
File "/home/wzy/SSD.TensorFlow-master/train_ssd.py", line 198, in input_fn
is_training=is_training)
File "/home/wzy/SSD.TensorFlow-master/dataset/dataset_common.py", line 231, in slim_get_batch
gt_targets, gt_labels, gt_scores = anchor_encoder(glabels, gbboxes)
File "/home/wzy/SSD.TensorFlow-master/train_ssd.py", line 187, in
anchor_encoder_fn = lambda glabels
, gbboxes
: anchor_encoder_decoder.encode_all_anchors(glabels
, gbboxes
, all_anchors, all_num_anchors_depth, all_num_anchors_spatial)
File "/home/wzy/SSD.TensorFlow-master/utility/anchor_manipulator.py", line 177, in encode_all_anchors
overlap_matrix = iou_matrix(bboxes, anchors_point) * tf.cast(tf.expand_dims(inside_mask, 0), tf.float32)
File "/home/wzy/SSD.TensorFlow-master/utility/anchor_manipulator.py", line 43, in iou_matrix
with tf.name_scope('iou_matrix', [gt_bboxes, default_bboxes]):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 6450, in init
"pass this into the values kwarg." % type(default_name))
TypeError: default_name type (<class 'list'>) is not a string type. You likely meant to pass this into the values kwarg.

@maidouxiaozi
Copy link

I have the same problem

@tinothy22
Copy link

I have same problem,do you solve?

@18846935350
Copy link

18846935350 commented Nov 14, 2019

查找tf.name_cope(),将[Image]更改为values=[Image],即Add values=

@tinothy22
Copy link

sorry, i can't find it,can you be more detailed?

@18846935350
Copy link

18846935350 commented Nov 15, 2019 via email

@tinothy22
Copy link

still the same mistake

@tinothy22
Copy link

i have solve,change all name_scope in anchor_manipulator.py

@18846935350
Copy link

18846935350 commented Nov 15, 2019 via email

@lambozhang
Copy link

I have same problem, What should I do

@jenweilee
Copy link

i have solve,change all name_scope in anchor_manipulator.py

what the details you did?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants