Can someone help me with this? I am getting this error for this function(compute_layer_style_cost).

Please post the entire assert stack. I suspect there’s a lot more of it - eventually it will identify which line of your code caused the error.

Hello @TMosh , I changed the tf.square, as it was mentioned in a lot of places that it is making error, Now I am doing **2, so now I am getting this error.

I think the problem is with my reshape, can you please check it once, I will remove it later.

Your shape parameters are incorrect.
Please do not post your code on the forum.

@TMosh can you tell me what changes I have to make? I gave the parameters as it was stated in comments.

Hint: The shape that’s given in the code comment is the resulting shape AFTER the transposition.

Hello, @TMosh I tried changing the reshape parameter, what I can sense here is I have to just unroll the 3D matrix, as I did in the previous task compute_content_cost(), so I am doing exactly same as what I did before, there I am getting the correct answer, but here it is showing the same error again and again. I am completely stuck.

You have the correct arguments, but in the wrong order.

@TMosh I changed the order also, previously I was using n_C,n_H * n_W and now I am using this n_H * n_W, n_C, but it is still giving wrong values.

@TMosh Thank you so much, finally got the answer. The mistake I was doing is that I was only manipulationg nH,nW,nC, I was keeping the m as it is.