GithubHelp home page GithubHelp logo

Comments (3)

tilakrayal avatar tilakrayal commented on June 12, 2024

@saluisto,
The error is because you adapt your code from a code with the original input image size 24*24. The tensor shape after two convolution and two max-pooling layers is [-1, 6, 6, 64]. However, as your input image shape is 150*150, the intermediate shape becomes [-1, 38, 38, 64].

The image size and the model's input shape were different. Could you please check your image size again.
Also take a look at this comment for the similar error. Thank you!

from tf-keras.

saluisto avatar saluisto commented on June 12, 2024

Thank you for your answer. But I am not sure if I understand your answer correctly: In my script I am not using a convolution layer neither a max-pooling layer. I only use dense layer architecture (see below). Input shape should be (-1,100)

Layer (type) Output Shape Param #

dense (Dense) (None, 100) 200

dense_1 (Dense) (None, 200) 20200

dense_2 (Dense) (None, 300) 60300

dense_3 (Dense) (None, 300) 90300

dense_4 (Dense) (None, 200) 60200

dense_5 (Dense) (None, 100) 20100

=================================================================
Total params: 251,300
Trainable params: 251,300
Non-trainable params: 0

from tf-keras.

saluisto avatar saluisto commented on June 12, 2024

I resolved the issue. Thank you for your help

from tf-keras.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.