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

Custom data training error #82

Open
JunShao-Hub opened this issue Nov 18, 2018 · 4 comments
Open

Custom data training error #82

JunShao-Hub opened this issue Nov 18, 2018 · 4 comments

Comments

@JunShao-Hub
Copy link

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)'

@ashleyjsands
Copy link

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.

@Mahibro
Copy link

Mahibro commented May 16, 2019

@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'

@ashleyjsands
Copy link

@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?

@Mahibro
Copy link

Mahibro commented May 18, 2019

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

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

3 participants