DLS Course 2 Week 2 Programming Assignment Exrercise 2

Hello,

I am getting the following error:

‘int’ object has no attribute ‘shape’

Code:

YOUR CODE STARTS HERE

    mini_batch_X = k*num_complete_minibatches
    mini_batch_Y = k*num_complete_minibatches
    
    # YOUR CODE ENDS HERE

YOUR CODE STARTS HERE

    mini_batch_X = math.floor(m/mini_batch_X)
    mini_batch_Y = math.floor(m/mini_batch_Y)
    # YOUR CODE ENDS HERE

Please let me know. Thank you.

There are totally m training examples.
Each mini batch uses mini_batch_size rows of training data.

In the 1st iteration, mini_batch_X and mini_batch_Y will contain features and targets from rows in training data (shuffled) in range `[0, mini_batch_size).

In the 2nd iteration, mini_batch_X and mini_batch_Y will contain features and targets from rows in training data (shuffled) in range `[mini_batch_size, mini_batch_size * 2).

There are k such iterations.

These variables are supposed to contain the actual data and not just the indices, i.e. they are not ints but arrays. Hence the error.