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

2 root error(s) found. #77

Open
ItsCRC opened this issue Dec 25, 2020 · 0 comments
Open

2 root error(s) found. #77

ItsCRC opened this issue Dec 25, 2020 · 0 comments

Comments

@ItsCRC
Copy link

ItsCRC commented Dec 25, 2020

Hey there, I added the crfrnn layer to the segmentation model U-Net from https://github.com/qubvel/segmentation_models/blob/master/segmentation_models/models/unet.py library. But at the fit time this error occurs: InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: Incompatible shapes: [524288] vs. [16384]
[[node loss_1/crfrnn_loss/custom_loss/mul_1 (defined at /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:3009) ]]
[[gradients_1/crfrnn_1/truediv_4_grad/RealDiv/_774]]
(1) Invalid argument: Incompatible shapes: [524288] vs. [16384]
[[node loss_1/crfrnn_loss/custom_loss/mul_1 (defined at /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:3009) ]]
0 successful operations.
0 derived errors ignored. [Op:__inference_keras_scratch_graph_143907]

Function call stack:
keras_scratch_graph -> keras_scratch_graph

Here are the last few lines of model summary:
decoder_stage4a_conv (Conv2D) (None, 128, 128, 16) 4608 decoder_stage4_upsampling[0][0]


decoder_stage4a_bn (BatchNormal (None, 128, 128, 16) 64 decoder_stage4a_conv[0][0]


decoder_stage4a_relu (Activatio (None, 128, 128, 16) 0 decoder_stage4a_bn[0][0]


decoder_stage4b_conv (Conv2D) (None, 128, 128, 16) 2304 decoder_stage4a_relu[0][0]


decoder_stage4b_bn (BatchNormal (None, 128, 128, 16) 64 decoder_stage4b_conv[0][0]


decoder_stage4b_relu (Activatio (None, 128, 128, 16) 0 decoder_stage4b_bn[0][0]


final_conv (Conv2D) (None, 128, 128, 1) 145 decoder_stage4b_relu[0][0]


sigmoid (Activation) (None, 128, 128, 1) 0 final_conv[0][0]


crfrnn (CrfRnnLayer) [(None, 128, 128, 1) 3 sigmoid[0][0]
input_1[0][0]

Total params: 29,933,108
Trainable params: 29,896,692
Non-trainable params: 36,416

Can anyone help me?

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