예제 #1
0
        protected override void ValidateOptions(OptimizingTrainerOptions options)
        {
            base.ValidateOptions(options);

            if (options.SequenceLength <= 0)
            {
                throw new InvalidOperationException("Invalid sequence length!");
            }
        }
예제 #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;
        }