Week 2 Exercise 2 - random_mini_batches

I would recommend you to study Python. Of course, you can learn it with solving these exercises, but it is the base for Tensorflow which is one of well-known frameworks for deep learning. That helps you to go further quickly. Here is the link to the thread for that.

This instruction includes several errors. For example, “(m-1)(m-mini_batch…” does not make sense for Python.
This means, you set (m-1) at first. “m” is, “int”, I think. Then, you added () after that, which mean, you tried to call “int” value with a parameter of (m-mini_batch…). So, my first thought was, we will get an error message of ‘int’ object is not callable’ at first.

What we want to is quite simple. We want create the last slice which does not have the given batch size. (less than 64). So, what is the starting point and the last point ? The starting point for the last slice is “mini_batch_size*num_complete_minibatches”, of course. And, the last point is, “end of the shuffled buffer”. For that, if you lean Python, you can find the easiest way, i.e, do not specify any. For example [:,start_point: ] means that a slice is from the “start_point” to the end of buffer. :slight_smile:
Hope this helps some.