protected override void ValidateOptions(OptimizingTrainerOptions options) { base.ValidateOptions(options); if (options.SequenceLength <= 0) { throw new InvalidOperationException("Invalid sequence length!"); } }
public OptimizingTrainer(NeuralNet <T> network, OptimizerBase <T> optimizer, IDataSet <T> trainingSet, OptimizingTrainerOptions options, OptimizingSession session) : base(options, session) { _network = network; _optimizer = optimizer; TrainingSet = trainingSet; // TODO: This is not very good. session.Optimizer = optimizer; session.Network = network; }