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

Shape mismatch error in route layer on specifying input shape in single_image.py #1

Open
shivamkhare95 opened this issue Nov 6, 2018 · 0 comments

Comments

@shivamkhare95
Copy link

I specified the input shape in single_image.py :
inputs = Input(shape=(416, 416, 3))

This gave me following error:
File "single_image.py", line 11, in
outputs, config = darknet_base(inputs, include_yolo_head=False)
File "/vol1/dbstore/orc_srib/n.hri/Hand_Localization/Experiments/005_yolov3_tflite_pc/YOLOv3/darknet.py", line 67, in darknet_base
x, layers, yolo_layers, ptr = _build_route_layer(x, block, layers, yolo_layers, ptr)
File "/vol1/dbstore/orc_srib/n.hri/Hand_Localization/Experiments/005_yolov3_tflite_pc/YOLOv3/darknet.py", line 224, in _build_route_layer
x = Concatenate(axis=3)(selected_layers)
File "/vol0/tool/ml/cuda9/.venv/py2/tensorflow-1.10.0/lib/python2.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 728, in call
self.build(input_shapes)
File "/vol0/tool/ml/cuda9/.venv/py2/tensorflow-1.10.0/lib/python2.7/site-packages/tensorflow/python/keras/utils/tf_utils.py", line 148, in wrapper
output_shape = fn(instance, input_shape)
File "/vol0/tool/ml/cuda9/.venv/py2/tensorflow-1.10.0/lib/python2.7/site-packages/tensorflow/python/keras/layers/merge.py", line 392, 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, None, None, 128), (None, 26, 26, 256)]

I can't think of a reason as to why it is able to get shape of one layer only in route layer and not the other.

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

1 participant