Esempio n. 1
0
        /// <summary>
        /// Creates an instance of the class, which represents a factory
        /// for a specific configuration file.
        /// </summary>
        /// <param name="filename">The configuration file.</param>
        public ConfiguredNeuralNetFactory(string filename)
        {
            // Load the configuration file
            XmlSerializer ser = new XmlSerializer(typeof(NeuralNetConfig));

            using (StreamReader sr = new StreamReader(filename))
            {
                config = (NeuralNetConfig)ser.Deserialize(sr);
            }
        }
Esempio n. 2
0
 public ConfiguredNeuralNet(NeuralNetConfig config)
     : base(config.InputNeuronCount, config.HiddenNeuronCount,
            config.OutputNeuronCount, config.LearningRate, config.formatter)
 {
     this.config = config;
 }