SSD.TensorFlow icon indicating copy to clipboard operation
SSD.TensorFlow copied to clipboard

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

Open CaptainKeer opened this issue 5 years ago • 10 comments

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.

CaptainKeer avatar Jul 25 '19 10:07 CaptainKeer

I have the same problem

maidouxiaozi avatar Sep 09 '19 05:09 maidouxiaozi

I have same problem,do you solve?

tinothy22 avatar Nov 14 '19 05:11 tinothy22

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

18846935350 avatar Nov 14 '19 08:11 18846935350

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

tinothy22 avatar Nov 15 '19 06:11 tinothy22

Search for name_scope in train_ssd.py. It should be 213 lines. Change name scope ("", []) to name scope ("", values = []).

------------------ 原始邮件 ------------------ 发件人: "tinothy22"<[email protected]>; 发送时间: 2019年11月15日(星期五) 下午2:10 收件人: "HiKapok/SSD.TensorFlow"<[email protected]>; 抄送: "小太阳"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [HiKapok/SSD.TensorFlow] TypeError: default_name type (<class 'list'>) is not a string type. When run train_ssd.py, I meet a TpyeError. (#117)

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

18846935350 avatar Nov 15 '19 08:11 18846935350

still the same mistake

tinothy22 avatar Nov 15 '19 08:11 tinothy22

i have solve,change all name_scope in anchor_manipulator.py

tinothy22 avatar Nov 15 '19 11:11 tinothy22

That's good. I just corrected this mistake the other day.

------------------ 原始邮件 ------------------ 发件人: "tinothy22"<[email protected]>; 发送时间: 2019年11月15日(星期五) 晚上7:12 收件人: "HiKapok/SSD.TensorFlow"<[email protected]>; 抄送: "小太阳"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [HiKapok/SSD.TensorFlow] TypeError: default_name type (<class 'list'>) is not a string type. When run train_ssd.py, I meet a TpyeError. (#117)

i have solve,change all name_scope in anchor_manipulator.py

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

18846935350 avatar Nov 15 '19 12:11 18846935350

I have same problem, What should I do

lambozhang avatar Jun 01 '20 12:06 lambozhang

i have solve,change all name_scope in anchor_manipulator.py

what the details you did?

jenweilee avatar Jun 20 '21 06:06 jenweilee