NeuralNet.learn

Train neural network on some data, using a gradient callback.

Assumes that an optimizer has already been specified on all learnable layers.

  1. void learn(D data, S delegate(R net_out, ref T ex, ref V[] grad) grad_f, O opt, bool verbose, uint num_cores)
  2. void learn(D data, string loss, O opt, bool verbose, uint num_cores, bool monitor_loss)
  3. void learn(D data, float delegate(R net_out, ref T ex, ref V[] grad) grad_f, bool verbose, uint num_cores)
    class NeuralNet
    void
    learn
    (
    D
    T
    V
    R
    S
    )
    (,
    float delegate
    (,
    ref T ex
    ,
    ref V[] grad
    )
    grad_f
    ,
    bool verbose = false
    ,
    uint num_cores = 1
    )
  4. void learn(D data, string loss, bool verbose, uint num_cores)

Parameters

data D

forward range of rows

grad_f float delegate
(,
ref T ex
,
ref V[] grad
)

gradient callback (see losses.d for details)

verbose bool

whether or not to show progress during training

num_cores uint

degree of Hogwild parallelism

Meta