Confusion with value l in 1st video "Mini batch Gradient descent"

if L is representing the number of samples in a mini batch in this code how the code format is vectorized. maybe l/L is representing the num of layers. Now to iterate over layers we must need a for loop. Am i wrong?

L refers to the number of layers. t refers to the index of mini-batch. If you have 5 million examples and your mini batch size is 1000, you’ll have 5000 mini batches. So, t runs from 1 through 5000.

There is no relationship between mini batch size and number of layers of the network.

In the video, you’ll see Z^{[1]}, A^{[1]}, Z^{[2]}, A^{[2]} . A^{[1]} is the output from the 1st layer. The example code explicitly iterated over both layers. When you code, you can use a for loop for that.

You don’t need an explicit for loop to process each example within a layer since you’re vectorizing the implementation (i.e. it’s implicitly taken care of).