-
Notifications
You must be signed in to change notification settings - Fork 51
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
Training on my own dataset #2
Comments
Do you mean YOLOv3? yes, for the training script itself, you just need to change to |
Hello Again.
Thanks for replying. For some reason I get the following error when I tried
to train
Traceback (most recent call last):
File "train.py", line 317, in <module>
main()
File "train.py", line 296, in main
shape=(416, 416, 3), num_classes=TOTAL_CLASSES, training=True)
File "/home/ubuntu/yolo/yolov3.py", line 152, in YoloV3
x = Concatenate(name='detector_scale_1_concat')([x, x_medium])
File
"/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/base_layer.py",
line 817, in __call__
self._maybe_build(inputs)
File
"/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/base_layer.py",
line 2141, in _maybe_build
self.build(input_shapes)
File
"/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/keras/utils/tf_utils.py",
line 306, in wrapper
output_shape = fn(instance, input_shape)
File
"/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/keras/layers/merge.py",
line 391, in build
'Got inputs shapes: %s' % (input_shape))
ValueError: A `Concatenate` layer requires inputs with matching shapes
except for the concat axis. Got inputs shapes: [(None, 256, 26, 2), (None,
512, 26, 1)]
Any idea why this is happening?
…On Tue, Jan 14, 2020 at 3:45 PM Ethan Yanjia Li ***@***.***> wrote:
Do you mean YOLOv3? yes, for the training script itself, you just need to
change to TOTAL_CLASSES=4. However my implementation uses TF Records so
you'll also need to make sure your data is ready in that format.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=ANCPHGCJXVICPEFZG35H2HLQ5YP7NA5CNFSM4KGWY7ZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI6CBAY#issuecomment-574365827>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANCPHGFXS3YZCQTX2E7QLVLQ5YP7NANCNFSM4KGWY7ZA>
.
--
*E.*
|
seems like the input shape is wrong during the concatenation in the detection head. the part i don't quite understand is that why x and x_medium could have shape of [(None, 256, 26, 2), (None, |
Hi Ethan,
Great work,
I was wondering, if I have my own data with lets say 4 classes, should I just changed TOTAL_CLASSES = 4 on train.py and I would be able to run it?
Thanks
The text was updated successfully, but these errors were encountered: