Course2 Week3 assignment mini-batch model won't run

I’m through all the steps leading to running the mini-batch model. All previous tests passed nicely but the model gives me the error below about the shape of logits not matching the shape of labels. Where do I look? If the model is using everything I’ve done before there is certainly an error in its own syntax but I’m not sure where. Please help.

logits and labels must have the same shape ((32, 6, 1) vs (32, 4, 1))

Well, what determines the shape of the logits? Which of the two shapes is the correct one based on the inputs to the test in question? Are you sure you didn’t “hard-code” any dimensions incorrectly or perhaps reference global variables instead of the actual parameters passed in? Those are usually the types of errors that result in a dimension mismatch.

1 Like

Spot on Paulin! I was unknowingly hardcoding my reshape function. Now all is good. Thank you for kindly answering my question.


It’s great to hear that you found the solution! Thanks for confirming. Onward! :nerd_face: