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

Concatenate layer doesn't match shapes #172

Open
joaomamede opened this issue Jun 19, 2024 · 0 comments
Open

Concatenate layer doesn't match shapes #172

joaomamede opened this issue Jun 19, 2024 · 0 comments

Comments

@joaomamede
Copy link

Hi,I'm testing MIScnn for IF data (grayscale input) and the segmentation has 3 labels (background =0,1,2).

I'm having an error when running

model = Neural_Network(preprocessor=pp, loss=tversky_loss, metrics=[dice_soft, dice_crossentropy],
                       batch_queue_size=3, workers=3, learning_rate=0.0001)

ValueError: A Concatenate layer requires inputs with matching shapes except for the concatenation axis. Received: input_shape=[(None, 4, 128, 128, 128), (None, 5, 128, 128, 128)]

I tried all kinds of shapes such as the whole image (1024,1024) half (512,512), a quarter etc. with different overlaps and I always have this error. I also tried without swapping axis (keeping Z as axis=0).

The same code with nii transformed dataset has the same problem. Another set from CT scans that are (200,512,512) do not have this problem.
I'm attaching the html of the whole notebook. Any hints that could solve this problem?

LaminTest-Dictionary.pdf

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