You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ``updates`` dictionary contains, for each parameter, the
306
308
stochastic gradient update operation. The ``givens`` dictionary indicates with
307
309
what to replace certain variables of the graph. The function ``train_model`` is then
308
310
defined such that:
309
311
310
-
* the input is the mini-batch offset ``minibatch_offset`` that together with the batch size( which is not an input since it is fixed) defines :math:`x` with corresponding labels :math:`y`
312
+
* the input is the mini-batch index ``index`` that together with the batch
313
+
size( which is not an input since it is fixed) defines :math:`x` with
314
+
corresponding labels :math:`y`
311
315
* the return value is the cost/loss associated with the x, y defined by
312
-
the ``minibatch_offset``
316
+
the ``index``
313
317
* on every function call, it will first replace ``x`` and ``y`` with the
314
-
* corresponding slices from the training set as defined by the
315
-
* ``minibatch_offset`` and afterwards it will evaluate the cost
316
-
* associated with that minibatch and apply the operations defined by the
318
+
corresponding slices from the training set as defined by the
319
+
``index`` and afterwards it will evaluate the cost
320
+
associated with that minibatch and apply the operations defined by the
317
321
``updates`` dictionary.
318
322
319
-
Each time ``train_model(minibatch_offset)`` function is called, it will thus compute and
323
+
Each time ``train_model(index)`` function is called, it will thus compute and
320
324
return the appropriate cost, while also performing a step of MSGD. The entire
321
325
learning algorithm thus consists in looping over all examples in the dataset,
322
326
and repeatedly calling the ``train_model`` function.
@@ -357,17 +361,19 @@ the other from the validation set.
0 commit comments