Skip to content

Commit

Permalink
Merge pull request #683 from mehdidc/fix_iterate_minibatches
Browse files Browse the repository at this point in the history
Clarifying comment for iterate_minibatches in mnist example
  • Loading branch information
f0k committed May 18, 2016
2 parents 31ac7d2 + 5a009f9 commit 5f3631e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/mnist.py
Expand Up @@ -209,6 +209,9 @@ def build_cnn(input_var=None):
# own custom data iteration function. For small datasets, you can also copy
# them to GPU at once for slightly improved performance. This would involve
# several changes in the main program, though, and is not demonstrated here.
# Notice that this function returns only mini-batches of size `batchsize`.
# If the size of the data is not a multiple of `batchsize`, it will not
# return the last (remaining) mini-batch.

def iterate_minibatches(inputs, targets, batchsize, shuffle=False):
assert len(inputs) == len(targets)
Expand Down

0 comments on commit 5f3631e

Please sign in to comment.