Learn Before
Concept

An Example of Mini-Batches

If you have a huge training set with 5000000 training samples, X=[x(1),x(2),...,x(5000000)]X=[ x^{(1)}, x^{(2)} ,..., x^{(5000000)}] Let's say each of your baby training sets have just 1,000 examples each. So, you take the first mini-batch as X{1}=[x(1),x(2),...,x(1000)]X^{\{ 1\}} =[x^{(1)}, x^{(2)} ,..., x^{(1000)}] . And then you take home the next 1,000 samples X{2}=[x(1001),...,x(2000)]X^{\{2\}} =[x^{(1001)}, ..., x^{(2000)}] and so on.

Altogether you would have 5,000 of these mini-batches and then similarly you do the same thing for Y. Hence we end up with mini-batches X{T},Y{T}X^{\{ T\}}, Y^{\{ T\}}, T = 1,2...,5000.

0

2

Updated 2020-09-19

Tags

Data Science