Coder Social home page Coder Social logo

InvalidArgumentError: Input to reshape is a tensor with 3200 values, but the requested shape requires a multiple of 49 [[{{node decoder/Reshape}}]] about deep-learning-with-python HOT 5 OPEN

felixmohr avatar felixmohr commented on May 30, 2024
InvalidArgumentError: Input to reshape is a tensor with 3200 values, but the requested shape requires a multiple of 49 [[{{node decoder/Reshape}}]]

from deep-learning-with-python.

Comments (5)

u112358 avatar u112358 commented on May 30, 2024 2

No description provided.

change x = tf.layers.dense(x, units=inputs_decoder * 2 + 1, activation=lrelu) to x = tf.layers.dense(x, units=inputs_decoder * 2, activation=lrelu) in decoder() will solve this problem.

from deep-learning-with-python.

AdityaAmrutiya avatar AdityaAmrutiya commented on May 30, 2024

I am also getting the same issue

from deep-learning-with-python.

erdalalim avatar erdalalim commented on May 30, 2024

@AdityaAmrutiya @alla15747 you solve it?
Iam trying to run face creation, its prepared to generate 40x40 pixel images.. I want to generate 200x200 pixel so I change 40,40,3 values to 200,200,3 to get 200pixel images but Iam facing this error :

InvalidArgumentError: Input to reshape is a tensor with 307200 values, but the requested shape requires a multiple of 120000
[[Node: discriminator_1/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](generator/conv2d_transpose_3/Sigmoid, discriminator/Reshape/shape)]]

any suggestions,In which line I need to make correction?

from deep-learning-with-python.

erdalalim avatar erdalalim commented on May 30, 2024

Hi @u112358 ,

i can't find the line x = tf.layers.dense(x, units=inputs_decoder * 2 + 1, activation=lrelu) in script (DCGAN-face-creation.ipynb), the code you mentioned is in VAE.ipynb.

i only need to change the size of the generated images from default size 40x40 to any other size example between: 100x100 or 200x200 pixels. When i tried to change the sizes i'm getting the error above. Do you have any idea how to change the sizes of images ?

thanks

from deep-learning-with-python.

arnouri avatar arnouri commented on May 30, 2024

No description provided.

change x = tf.layers.dense(x, units=inputs_decoder * 2 + 1, activation=lrelu) to x = tf.layers.dense(x, units=inputs_decoder * 2, activation=lrelu) in decoder() will solve this problem.

This is a full year later so sorry for reviving this but I was wondering if you could provide any insight on why this fix works?
Thanks!

from deep-learning-with-python.

Related Issues (10)

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.