コード例 #1
0
ファイル: Convolution2D.cs プロジェクト: wormhole2019/KelpNet
        //Convert
        public Convolution2D(CPU.Convolution2D <T> conv2d) : base(conv2d.Name, conv2d.InputNames, conv2d.OutputNames)
        {
            this.StrideX = conv2d.StrideX;
            this.StrideY = conv2d.StrideY;
            this.PadX    = conv2d.PadX;
            this.PadY    = conv2d.PadY;

            this.Weight = conv2d.Weight;
            this.Bias   = conv2d.Bias;

            this.Parameters = conv2d.Parameters;

            this.Activation = (ICompressibleActivation <T>)CLConverter.Convert(conv2d.Activation);

            this.SetParallel(true);
            this.InitFunc(new StreamingContext());
        }
コード例 #2
0
        //Convert
        public Convolution2D(CPU.Convolution2D conv2d) : base(conv2d.Name, conv2d.InputNames, conv2d.OutputNames)
        {
            this.KernelWidth  = conv2d.KernelWidth;
            this.KernelHeight = conv2d.KernelHeight;
            this.StrideX      = conv2d.StrideX;
            this.StrideY      = conv2d.StrideY;
            this.PadX         = conv2d.PadX;
            this.PadY         = conv2d.PadY;
            this.NoBias       = conv2d.NoBias;

            this.OutputCount = conv2d.OutputCount;
            this.InputCount  = conv2d.InputCount;

            this.Weight = conv2d.Weight;
            this.Bias   = conv2d.Bias;

            this.Parameters = conv2d.Parameters;

            this.Activation = (ICompressibleActivation)CLConverter.Convert(conv2d.Activation);

            this.SetParallel(true);
        }