Ejemplo n.º 1
0
 internal Model(List <LayerConfiguration> layerConfig)
 {
     _layerConfiguration = layerConfig;
     _layers             = new List <IForwardLayer>();
     foreach (var lc in _layerConfiguration)
     {
         var layer = LayerFactory.Produce(lc);
         _layers.Add(layer);
     }
 }
Ejemplo n.º 2
0
        public Model(string path)
        {
            var json = File.ReadAllText(path);

            _layerConfiguration = JsonConvert.DeserializeObject <List <LayerConfiguration> >(json, jsonSerializerSettings);
            _layers             = new List <IForwardLayer>();
            foreach (var lc in _layerConfiguration)
            {
                var layer = LayerFactory.Produce(lc);
                _layers.Add(layer);
            }
        }