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

ValueError: Error when checking input: expected conv2d_1_input to have shape (256, 256, 1) but got array with shape (1, 256, 256) #23

Open
xyh-qz opened this issue Jun 8, 2019 · 3 comments

Comments

@xyh-qz
Copy link

xyh-qz commented Jun 8, 2019

Thank you for sharing the code. I have been trying to apply your code a data set. However, running the code gives the following error message:
exception_prefix='input')
File "D:\Program Files\Python\Python35\lib\site-packages\keras\engine\training_utils.py", line 138, in standardize_input_data
str(data_shape))
ValueError: Error when checking input: expected conv2d_1_input to have shape (256, 256, 1) but got array with shape (1, 256, 256)

@kskeshab
Copy link

kskeshab commented Jul 8, 2019

same error occured when I use this code

Any one give me the solution

@robelkebede
Copy link

reshape the training data

train_data = train_data.reshape(6,256,256,1)

@Roshni-Jhariya
Copy link

Try setting data_format= channels_last

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

4 participants