Course four week 4 assignment 2

I keep getting an error on this exercise for some reason, any help figuring it out would be greatly appreciated!

{moderator edit - solution code removed}

You filed this under General Discussion, so I moved it to DLS Course 4 for you by using the little “Edit Pencil” on the title.

Also note that we aren’t supposed to post solution code in a public way, so I also edited the post.

It looks like the problem is that you just did the reshape directly to the final shape you wanted, but you need to do it in a way that preserves the “channels” dimension. They mention in the instructions that you may want to use transpose in addition to reshape. Here’s a thread which explains this in detail and shows an example of why your method “scrambles” the data.

thank you!