예제 #1
0
        public LayerInfo(ModelLayerBase paLayer, NetModelBase paNetModelBase)
        {
            _model = paNetModelBase;
            Layer  = paLayer;
            var conv    = paLayer as NeuralNetConvReluLayerModel;
            var pooling = paLayer as NeuralNetConvolvingLayerModel;
            var output  = paLayer as NeuralNetOutputLayerModel;
            var hidden  = paLayer as FullyConectedLayerModel;

            if (conv != null || pooling != null)
            {
                Name = conv != null ? "conv relu layer" : "max pooling layer";
            }
            else if (output != null || hidden != null)
            {
                Name = output != null ? "output FCN layer" : "hidden FCN layer";
            }
            else if (paLayer is NeuralNetDropoutLayerModel)
            {
                Name = "dropout layer";
            }
            if (Layer != null)
            {
                Layer.PropertyChanged += LayerOnPropertyChanged;
            }
        }
예제 #2
0
 public void ChangeModel([NotNull] NetModelBase paModel)
 {
     if (_model == null)
     {
         throw new Exception("This method is only for changing model. If you want to add model please use constructor of the class.");
     }
     _model = paModel;
 }
 public NetModelCreator(NetModelBase paModel) : this()
 {
     paModel.Layers.ForEach(l =>
     {
         var layer = l.Clone();
         layer.ChangeModel(this);
         ModelLayers.Add(layer);
     }).ExecuteQuery();
     ModelName = (string)paModel.ModelName.Clone();
 }