yolo_tensorflow icon indicating copy to clipboard operation
yolo_tensorflow copied to clipboard

Custom data training error

Open JunShao-Hub opened this issue 7 years ago • 4 comments

Traceback (most recent call last): File "/home/shaojun/PycharmProjects/yolo_tensorflow/train.py", line 165, in main() File "/home/shaojun/PycharmProjects/yolo_tensorflow/train.py", line 158, in main solver.train() File "/home/shaojun/PycharmProjects/yolo_tensorflow/train.py", line 105, in train self.sess.run(self.train_op, feed_dict=feed_dict) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 929, in run run_metadata_ptr) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1128, in _run str(subfeed_t.get_shape()))) ValueError: Cannot feed value of shape (45, 7, 7, 25) for Tensor u'Placeholder:0', which has shape '(?, 7, 7, 7)'

JunShao-Hub avatar Nov 18 '18 08:11 JunShao-Hub

Without looking at the code, my guess it that you haven't changed the number of classes as the main difference between the two shapes is 25 and 7.

ashleyjsands avatar Nov 24 '18 03:11 ashleyjsands

@ashleyjsands Can you tel me what i need to change? python train.py WARNING:tensorflow:From /home/g5cdevs_gcp/yolo_tensorflow/yolo/yolo_net.py:186: calling reduce_max (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead Processing gt_labels from: data/pascal_voc/VOCdevkit/VOC2007 Traceback (most recent call last): File "train.py", line 164, in main() File "train.py", line 152, in main pascal = pascal_voc('train') File "/home/g5cdevs_gcp/yolo_tensorflow/utils/pascal_voc.py", line 26, in init self.prepare() File "/home/g5cdevs_gcp/yolo_tensorflow/utils/pascal_voc.py", line 57, in prepare gt_labels = self.load_labels() File "/home/g5cdevs_gcp/yolo_tensorflow/utils/pascal_voc.py", line 102, in load_labels label, num = self.load_pascal_annotation(index) File "/home/g5cdevs_gcp/yolo_tensorflow/utils/pascal_voc.py", line 138, in load_pascal_annotation cls_ind = self.class_to_ind[obj.find('name').text.lower().strip()] KeyError: 'linear'

Mahibro avatar May 16 '19 11:05 Mahibro

@Mahibro I have no idea why you are getting that error. Having a guess: maybe an activation function of 'linear' is missing or not supported?

ashleyjsands avatar May 17 '19 11:05 ashleyjsands

@ashleyjsands @hizhangp What all i need to make change(In files),when i create XML files for my own dataset.

Mahibro avatar May 18 '19 07:05 Mahibro