Error in my mini-batch implementation

Hi,
I’m stuck on this exercise. I don’t see why my last batch (which debugging seems to be right) is not showing up right in the test scripts.

(12288, 148)
X shape is:(12288, 148)
Y shape is:(1, 148)
final batch range: 128 : 20
shape of the 1st mini_batch_X: (12288, 64)
shape of the 2nd mini_batch_X: (12288, 64)
shape of the 3rd mini_batch_X: (12288, 0)
shape of the 1st mini_batch_Y: (1, 64)
shape of the 2nd mini_batch_Y: (1, 64)
shape of the 3rd mini_batch_Y: (1, 0)
mini batch sanity check: [ 0.90085595 -0.7612069 0.2344157 ]
(7, 3)
X shape is:(7, 3)
Y shape is:(1, 3)
final batch range: 2 : 1
(7, 3)
X shape is:(7, 3)
Y shape is:(1, 3)
final batch range: 2 : 1
Error: Wrong shape for variable 0.
Error: Wrong shape for variable 1.
(7, 3)
X shape is:(7, 3)
Y shape is:(1, 3)

Fixed by @Edu4rd. The stopping index was not correct.

Good luck with the rest of the assignment :slight_smile:

2 Likes

Finished week 2. Jumping into week 3. Thank you!

1 Like