Esempio n. 1
0
 public override void Initialize(Shape inputShape)
 {
     base.Initialize(inputShape);
     ParametersStorage.Weights = Builder.OfShape(new Shape(FiltersCount, inputShape[1], KernelSize, KernelSize));
     _initializer.InitWeights(this);
     OutputShape = Tensor.GetConvolutionalShape(inputShape, ParametersStorage.Weights.Storage.Shape, Stride, 0);
     ParametersStorage.Gradients = Builder.OfShape(ParametersStorage.Weights.Storage.Shape);
     InitializeBuffers();
 }
Esempio n. 2
0
        public override void Initialize(Shape inputShape)
        {
            base.Initialize(inputShape);
            ParametersStorage.Weights = Builder.OfShape(new Shape(1, 1, inputShape[3], NeuronsCount));
            _initializer.InitWeights(this);
            ParametersStorage.Gradients = Builder.OfShape(new Shape(1, 1, inputShape[3], NeuronsCount));
            OutputShape = new Shape(inputShape[0], 1, 1, NeuronsCount);

            _transBufferDx = Builder.Empty();
            _transBufferDw = Builder.Empty();
        }