C2, W3 Programming Assignment

This code snippet keeps giving error.
I tried every option but it’s not working

{moderator edit: code removed}

And this gives “ValueError: Shapes (1, 6, 2) and (6, 2) are incompatible”

{moderator edit: code removed}

Please do not post your code on the forum. That’s not allowed by the Code of Conduct.
If a mentor needs to see your code, we’ll contact you with intructions.

Hint:
This isn’t correct. You need the comma, but not the ‘1’.
image

Also, for total_loss, compare the shape of the labels and logits arguments vs. this note in the instructions:

Your code hasn’t considered this.