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 input_12 to have 4 dimensions, but got array with shape (4, 1) #29

Closed
sandhya9173 opened this issue Mar 18, 2020 · 10 comments

Comments

@sandhya9173
Copy link

I mnot able to understand where this problem in this line its showing error(d_loss_real = discriminator.train_on_batch(image_batch_hr, real_data_Y) but my images size(shape (96, 96, 3)), can you please where its problem

@sandhya9173
Copy link
Author

pic
pic2

Both check please help in this error I mnot understanding

@deepak112
Copy link
Owner

You still facing this issue?

@sirius0503
Copy link

@deepak112 Hi Deepak, I am facing a similar issue could you please look at this thread here, I think it is a similar issue, except @sandhya9173 is trying to train the model, whereas I am trying to evaluate your pretrained model issue

@mustaeenqazi
Copy link

@deepak112 Hi Deepak iam facing the same issue while training, using the simplified code, in Colab

@deepak112
Copy link
Owner

Hi,
Can you please tell me shape of x_train_lr, x_train_hr, x_test_lr, x_test_hr in your code.

@mustaeenqazi
Copy link

thanks for prompt reply, here are the shapes:
x_train_lr = (500,)
x_train_hr = (500,)
x_test_lr = (300,)
x_test_lr = (300,)

@deepak112
Copy link
Owner

Are all images are of same shape?

@mustaeenqazi
Copy link

LOADING data and resizing

@mustaeenqazi
Copy link

shall i use the function load_data_from_dirs_resize instead of load_data_from_dirs, to load the data?

@deepak112
Copy link
Owner

Ya images are not of same size. Either make one custom funtion to have same size images. And then save those images to some directory and then use load_data_from_dirs.

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