internal Model(List <LayerConfiguration> layerConfig) { _layerConfiguration = layerConfig; _layers = new List <IForwardLayer>(); foreach (var lc in _layerConfiguration) { var layer = LayerFactory.Produce(lc); _layers.Add(layer); } }
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); } }