Batching issues


Hi all,

I’m trying to get my head around how Flux deals with batching. I can see how the mlp.jl example works in the model zoo - making one big batch using hcat, then using repeated((X,Y),200) to effectively go through 200 epochs. I have a couple of questions:

  1. If X isn’t turned into a single batch i.e.
X = float.(reshape.(imgs, :))

what tweaks need to be made e.g. to the loss and accuracy functions.

  1. How do I tweak the file to allow e.g. minibatches of 1000?

There was an explicit section on batching in the old (<0.3) API documentation, but this has been dropped in recent versions.



You’ll find some batching-related tools in this file