Example #1
0
 /**
  * Create the PoolingConnection object using the specified input layer, output
  * layer, optimizer and pooling strategy.
  *
  * @param InputLayerType The input layer which is connected with the output
  * layer.
  * @param OutputLayerType The output layer which is connected with the input
  * layer.
  * @param PoolingRule The strategy of pooling.
  */
 PoolingConnection(InputLayerType& inputLayer,
                   OutputLayerType& outputLayer,
                   PoolingRule pooling = PoolingRule()) :
     inputLayer(inputLayer),
     outputLayer(outputLayer),
     optimizer(0),
     weights(0),
     pooling(pooling),
     delta(arma::zeros<DataType>(inputLayer.Delta().n_rows,
         inputLayer.Delta().n_cols, inputLayer.Delta().n_slices))
 {
   // Nothing to do here.
 }
Example #2
0
 /**
  * Create the PoolingLayer object using the specified number of units.
  *
  * @param kSize Size of the pooling window.
  * @param pooling The pooling strategy.
  */
 PoolingLayer(const size_t kSize, PoolingRule pooling = PoolingRule()) :
     kSize(kSize), pooling(pooling)
 {
   // Nothing to do here.
 }