-
-
Notifications
You must be signed in to change notification settings - Fork 318
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 (216, 360, 3) but got array with shape (300, 500, 3) #266
Comments
Hey, guys! I'm having the same problem... I'm running my code on a Jupyter Notebook. Is that a problem? TypeError Traceback (most recent call last) ~\AppData\Local\Continuum\anaconda3\lib\site-packages\hyperas\optim.py in minimize(model, data, algo, max_evals, trials, functions, rseed, notebook_name, verbose, eval_space, return_space, keep_temp) ~\AppData\Local\Continuum\anaconda3\lib\site-packages\hyperas\optim.py in base_minimizer(model, data, functions, algo, max_evals, trials, rseed, full_model_string, notebook_name, verbose, stack, keep_temp) ~\AppData\Local\Continuum\anaconda3\lib\site-packages\hyperas\optim.py in get_hyperopt_model_string(model, data, functions, notebook_name, verbose, stack) ~\AppData\Local\Continuum\anaconda3\lib\site-packages\hyperas\optim.py in retrieve_data_string(data, verbose) ~\AppData\Local\Continuum\anaconda3\lib\inspect.py in getsource(object) ~\AppData\Local\Continuum\anaconda3\lib\inspect.py in getsourcelines(object) ~\AppData\Local\Continuum\anaconda3\lib\inspect.py in findsource(object) ~\AppData\Local\Continuum\anaconda3\lib\inspect.py in getsourcefile(object) ~\AppData\Local\Continuum\anaconda3\lib\inspect.py in getfile(object) TypeError: module, class, method, function, traceback, frame, or code object was expected, got tuple And my final code is: from hyperopt import Trials, STATUS_OK, tpe if name == 'main': |
@anasouza26 please make a new issue and use triple backticks at the start and end of your code (like this: ```) to format your code so we can actually read it. Avoid posting the same question in multiple issues as well. |
@JonnoFTW Sure thing! Done! |
Hi, first of all thank you for your work.
I'm trying to use your framework to optimize hiperparameters in my Convolutional Neural Network in order to implement an image classifier.
I'm obtaining the following error:
ValueError: Error when checking input: expected conv2d_1_input to have shape (216, 360, 3) but got array with shape (300, 500, 3)
I have checked my data construction function and the training data returned have the right shape (216, 360, 3) but for some reason the model receive an input with shape (300, 50, 3).
I really don't know what to do, here is my code:
Thank you in advance for your help
The text was updated successfully, but these errors were encountered: