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

Data type or ValueError: Input 0 of layer max_pooling2d is incompatible with the layer: expected ndim=4, found ndim=5. Full shape received: [None, None, None, None, 16] #2

Open
katiejx opened this issue Jan 22, 2021 · 0 comments

Comments

@katiejx
Copy link

katiejx commented Jan 22, 2021

Hi @JielongZ !
Thank you very much for your very well organized code.
I 'm quite new to python and I am trying to implement unet on my dataset of medical images. I would like to ask if you could give me information about the data type that you used to train the unet model. Would that be easy for you to please give a sample image from your training set?

I am asking this because when I try to run unet_keras.py on my data (after changing the paths in lines 15, 16 and 75), I get the following warning and error after executing line 87 (model.fit_generator):

WARNING:tensorflow:Model was constructed with shape (None, 512, 512, 1) for input Tensor("input_1:0", shape=(None, 512, 512, 1), dtype=float32), but it was called on an input with incompatible shape (None, None, None, None, None).

ValueError: Input 0 of layer max_pooling2d is incompatible with the layer: expected ndim=4, found ndim=5. Full shape received: [None, None, None, None, 16]

I have the following packages installed (all versions greater than the ones you suggest):
tensorflow-gpu==2.3.1
keras==2.4.3
scikit-image==0.16.2
tqdm==4.47.0
numpy==1.18.5

Grateful for any possible help, thank you in advance.

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