A cross validation configuration for the training session.

CrossValidationConfig(minibatch_source = NULL, frequency = NULL,
  minibatch_size = 32, callback = NULL, max_samples = NULL,
  model_inputs_to_streams = NULL, criterion = NULL, source = NULL)

Arguments

minibatch_source

(MinibatchSource): minibatch source used for cross validation

frequency

(int): frequency in samples for cross validation If NULL or ``sys.maxsize``, a single cross validation is performed at the end of training.

callback

(func (index, average_error, cv_num_samples, cv_num_minibatches)): Callback that will be called with frequency which can implement custom cross validation logic, returns FALSE if training should be stopped.

max_samples

(int, default NULL): number of samples to perform cross-validation on. If NULL, all samples are taken.

model_inputs_to_streams

(dict): mapping between input variables and input streams If NULL, the mapping provided to the training session constructor is used. Don't specify this if `minibatch_source` is a tuple of numpy/scipy arrays.

criterion

(): criterion function): criterion function. Must be specified if `minibatch_source` is a tuple of numpy/scipy arrays.

source

(MinibatchSource): DEPRECATED, use minibatch_source instead

minibatch_size(int

or minibatch_size_schedule, defaults to 32): minibatch schedule for cross validation