mini_batch_X = shuffled_X[:, k * mini_batch_size:(k + 1) * mini_batch_size]
What is the semantics of the above line? what does the first colon mean?
mini_batch_X = shuffled_X[:, k * mini_batch_size:(k + 1) * mini_batch_size]
What is the semantics of the above line? what does the first colon mean?
Colon in a slicing operation will generate
slice(None, None, None), in numpy it meanstake all indices for this dimension.A slice is
start:end:step, usually step is omitted writing onlystart:end, but you can also omit start:endthat will slice from beginning, orstart:that will end at the last index.