sadeepj / crfasrnn_keras

CRF-RNN Keras/Tensorflow version
http://crfasrnn.torr.vision
MIT License
603 stars 169 forks source link

ValueError: Operands could not be broadcast together with shapes (21, 34, 4) (21, 34, 3) #60

Open JadBatmobile opened 5 years ago

JadBatmobile commented 5 years ago

Running the demo as instructed, giving this output

Traceback (most recent call last): File "run_demo.py", line 48, in <module> main() File "run_demo.py", line 38, in main model = get_crfrnn_model_def() File "./src/crfrnn_model.py", line 91, in get_crfrnn_model_def score_fused = Add()([score2, score_pool4c]) File "/home/hallab/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 431, in __call__ self.build(unpack_singleton(input_shapes)) File "/home/hallab/.local/lib/python3.5/site-packages/keras/layers/merge.py", line 91, in build shape) File "/home/hallab/.local/lib/python3.5/site-packages/keras/layers/merge.py", line 61, in _compute_elemwise_op_output_shape str(shape1) + ' ' + str(shape2)) ValueError: Operands could not be broadcast together with shapes (21, 34, 4) (21, 34, 3)

JadBatmobile commented 5 years ago

It seems the line 91:

score_fused = Add()([score2, score_pool4c])

sadeepj commented 5 years ago

@JadBatmobile was this resolved? It looks like the problem was caused by using an image size other than (500 x 500).