예제 #1
0
 public PoolingLayer(int kernelSize, int layerIndex, FilterMeta filterMeta)
     : base(layerIndex, filterMeta)
 {
     _maxValues  = new bool[filterMeta.Channels, filterMeta.Size, filterMeta.Size];
     _inputMaps  = new double[filterMeta.Channels, filterMeta.Size, filterMeta.Size];
     _kernelSize = kernelSize;
 }
예제 #2
0
        public ConvolutionalLayer(int nk, int ks, int li, FilterMeta ifm, IWeightInitializer wi, LearningRateAnnealerType lrat)
            : base(li, ifm)
        {
            _numberOfKernels = nk;
            _kernelSize      = ks;

            List <Kernel> temp = new List <Kernel>();

            for (int i = 0; i < _numberOfKernels; i++)
            {
                var k = new Kernel(ks, ifm.Channels, lrat);
                k.RandomizeWeights(wi);
                temp.Add(k);
            }

            _kernels     = new List <Kernel>(temp);
            _inputeFm    = ifm;
            _outputFm    = GetOutputFilterMeta();
            _featureMaps = new double[_outputFm.Channels, _outputFm.Size, _outputFm.Size];
        }
예제 #3
0
 public DetectorLayer(int layerIndex, IActivator activator, FilterMeta filterMeta)
     : base(layerIndex, filterMeta)
 {
     _featureMaps = new double[filterMeta.Channels, filterMeta.Size, filterMeta.Size];
     _activator   = activator;
 }
예제 #4
0
 protected FilterLayer(int layerIndex, FilterMeta filterMeta)
     : base(layerIndex)
 {
     InputFilterMeta = filterMeta;
 }