Ejemplo n.º 1
0
        protected override void ValidateOptions(OptimizingTrainerOptions options)
        {
            base.ValidateOptions(options);

            if (options.SequenceLength <= 0)
            {
                throw new InvalidOperationException("Invalid sequence length!");
            }
        }
Ejemplo n.º 2
0
        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;
        }