Beispiel #1
0
        public Linear(CPU.Linear <T> linear) : base(linear.Name, linear.InputNames, linear.OutputNames)
        {
            this.Weight = linear.Weight;
            this.Bias   = linear.Bias;

            this.Parameters = linear.Parameters;

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

            this.SetParallel(true);
        }
Beispiel #2
0
        public Deconvolution2D(CPU.Deconvolution2D <T> deconv2D) : base(deconv2D.Name, deconv2D.InputNames, deconv2D.OutputNames)
        {
            this.PadX    = deconv2D.PadX;
            this.PadY    = deconv2D.PadY;
            this.StrideX = deconv2D.StrideX;
            this.StrideY = deconv2D.StrideY;

            this.Weight = deconv2D.Weight;
            this.Bias   = deconv2D.Bias;

            this.Parameters = deconv2D.Parameters;

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

            this.SetParallel(true);
            this.InitFunc(new StreamingContext());
        }
Beispiel #3
0
        //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());
        }
        public Deconvolution2D(CPU.Deconvolution2D deconv2D) : base(deconv2D.Name, deconv2D.InputNames, deconv2D.OutputNames)
        {
            this.KernelWidth  = deconv2D.KernelWidth;
            this.KernelHeight = deconv2D.KernelHeight;
            this.PadX         = deconv2D.PadX;
            this.PadY         = deconv2D.PadY;
            this.StrideX      = deconv2D.StrideX;
            this.StrideY      = deconv2D.StrideY;
            this.NoBias       = deconv2D.NoBias;

            this.OutputCount = deconv2D.OutputCount;
            this.InputCount  = deconv2D.InputCount;

            this.Weight = deconv2D.Weight;
            this.Bias   = deconv2D.Bias;

            this.Parameters = deconv2D.Parameters;

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

            this.SetParallel(true);
        }
Beispiel #5
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);
        }