Perform one training task.
Inheritance: IEngineTask
        /// <inheritdoc/>
        public void Perform(TrainingJob job)
        {

            lock (this)
            {
                if (!this.ready)
                {
                    throw new NeuralNetworkError(
                            "Performer is already performing a job.");
                }

                this.ready = false;
            }

            this.currentJob = job;

            PerformerTask task = new PerformerTask(this);
            EngineConcurrency.Instance.ProcessTask(task);
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public void Perform(TrainingJob job)
        {
            lock (this)
            {
                if (!this.ready)
                {
                    throw new NeuralNetworkError(
                              "Performer is already performing a job.");
                }

                this.ready = false;
            }

            this.currentJob = job;

            PerformerTask task = new PerformerTask(this);

            EngineConcurrency.Instance.ProcessTask(task);
        }