BatchSize

BatchSize

is an option for NetTrain and related functions that specifies the size of a batch of examples to process together.

Details

  • Setting BatchSizen specifies that n examples should be processed together.
  • The default setting of BatchSize->Automatic specifies that the BatchSize should be chosen based on factors such as the available GPU or system memory, etc.

Examples

open allclose all

Basic Examples  (1)

Define a single-layer neural network and train this network with a BatchSize of 300:

In[1]:=
Click for copyable input
Out[1]=

Predict the value of a new input:

In[2]:=
Click for copyable input
Out[2]=

Properties & Relations  (1)

See Also

NetTrain  MaxTrainingRounds

Introduced in 2016
(11.0)