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: Input 0 of layer conv1 is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: [32, 64, 3] #19
Comments
Can you provide your enviroments (tensorflow version) ? I have test it locally (tensorflow 2.1), and work well. |
Thanks for the quick reply @StevenBanama . I have tensorflow 2.3. I am new to these things and just trying to test it on one of the test images. inputs may invalid which needs (1, 64, 64, 3) and your inputs size shows it as (32, 64, 3) . Can you please elaborate a little on how to resolve the issue. |
You can do print the shape img before lines 102 like this to check the inputs. |
Firstly you can update your local repos. And then run it as below.
|
Have you resolved it? Feeling free to promote the issue~ |
i have found the solution, so you just need to np.expand_dim() each image in tri_imgs array.. then pass tri_imgs array to model.predict(). it will work fine |
def predict(models, img, save_image=False):
using these codes to replace the source file,can solve the problem |
while running the command >python nets/test.py -g -v -se -m ./model/c3ae_model_v2_151_4.301724-0.962, I am getting a value error.
ValueError: Input 0 of layer conv1 is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: [32, 64, 3]
Any help is much appreciated!
The text was updated successfully, but these errors were encountered: