internal ConvolutionalLayerVertex(string name,
                                   ConvolutionalLayerParameter parameter,
                                   ImmutableList <ConvolutionalLayerLearningRateParameter> learnRateParams = null) : this(name)
 {
     Parameter           = parameter;
     LearnRateParameters = learnRateParams;
 }
        internal override LayerVertex Deserialize(IReadOnlyDictionary <string, object> properties)
        {
            base.Deserialize(properties);
            var parameter = new ConvolutionalLayerParameter();

            int.TryParse(properties[nameof(Parameter.NumberOfOutput)].ToString(), out int numberOfOutput);
            parameter.NumberOfOutput = numberOfOutput;
            int.TryParse(properties[nameof(Parameter.KernelSize)].ToString(), out int kernelSize);
            parameter.KernelSize = kernelSize;
            int.TryParse(properties[nameof(Parameter.Padding)].ToString(), out int padding);
            parameter.Padding = padding;
            int.TryParse(properties[nameof(Parameter.Stride)].ToString(), out int stride);
            parameter.Stride = stride;
            bool.TryParse(properties[nameof(Parameter.BiasTerm)].ToString(), out bool biasTerm);
            parameter.BiasTerm = biasTerm;
            return(this);
        }
Exemple #3
0
 public static ConvolutionalLayerVertex ConvLayer(string name,
                                                  ConvolutionalLayerParameter parameter,
                                                  ImmutableList <ConvolutionalLayerLearningRateParameter> learnRateList = null)
 {
     return(new ConvolutionalLayerVertex(name, parameter, learnRateList));
 }