Not getting correct output in tf.reshape

{moderator edit - solution code removed}

This is what I tried

This is the error that is coming.

Pls help

You are “hard-coding” the output dimension on the “reshape” to be 4. That can’t possibly work in the “general” case, right? The dimension is passed in as an argument depth: why don’t you use that instead?

1 Like