public static ILayer Load(LayerType layerType, BinaryReader br, bool forTraining = false) { ILayer layer = null; switch (layerType) { case LayerType.LSTM: layer = new LSTMLayer(); break; case LayerType.DropOut: layer = new DropoutLayer(); break; case LayerType.Softmax: layer = new SoftmaxLayer(); break; case LayerType.SampledSoftmax: layer = new SampledSoftmaxLayer(); break; case LayerType.Simple: layer = new SimpleLayer(); break; } layer.Load(br, layerType, forTraining); return(layer); }
public static SimpleLayer Load(LayerType layerType, BinaryReader br) { switch (layerType) { case LayerType.LSTM: return(LSTMLayer.Load(br, LayerType.LSTM)); case LayerType.DropOut: return(DropoutLayer.Load(br, LayerType.DropOut)); case LayerType.Softmax: return(SoftmaxLayer.Load(br, LayerType.Softmax)); case LayerType.SampledSoftmax: return(SampledSoftmaxLayer.Load(br, LayerType.SampledSoftmax)); case LayerType.Simple: return(SimpleLayer.Load(br, LayerType.Simple)); } return(null); }