Пример #1
0
 public FeatureMapProps(ConvolutionalLayerProps layerProps)
 {
     NeighborhoodCols = layerProps.NeighborhoodCols;
     neighborhoodRows = layerProps.NeighborhoodRows;
     FeatureRows      = layerProps.FeatureRows;
     FeatureCols      = layerProps.FeatureCols;
 }
Пример #2
0
        //TODO figure out batching for a CNN
        public ConvolutionalLayer(ConvolutionalLayerProps props, ActivationFunctions activationFunction, uint batches = 1, bool outputLayer = false)
            : base((uint)props.ConvolutionalOutputs, 0, activationFunction, batches, outputLayer)
        {
            Props        = props;
            InputSegment = new float[props.InputRows][];
            for (int i = 0; i < InputSegment.Length; i++)
            {
                InputSegment[i] = new float[props.InputCols];
            }

            FeatureMapProps featureProps = new FeatureMapProps(props);

            FeatureMaps = new FeatureMap[props.NumberFeatures];
            for (int f = 0; f < FeatureMaps.Length; f++)
            {
                FeatureMaps[f] = new FeatureMap(featureProps);
            }

            MaxPoolProps poolProps = new MaxPoolProps(props);

            MaxPools = new MaxPool[props.NumberFeatures];
            for (int p = 0; p < FeatureMaps.Length; p++)
            {
                MaxPools[p] = new MaxPool(poolProps);
            }
        }
Пример #3
0
 public MaxPoolProps(ConvolutionalLayerProps layerProps)
 {
     PoolCols = layerProps.PoolCols; PoolRows = layerProps.PoolRows;
 }