Search in sources :

Example 11 with ImgBandBiasLayer

use of com.simiacryptus.mindseye.layers.cudnn.ImgBandBiasLayer in project MindsEye by SimiaCryptus.

the class VGG19_HDF5 method phase3a.

/**
 * Phase 3 a.
 */
protected void phase3a() {
    add(new ConvolutionLayer(1, 1, 4096, 4096).setPaddingXY(0, 0).setAndFree(hdf5.readDataSet("param_0", "layer_40").permuteDimensionsAndFree(fullyconnectedOrder)));
    add(new ImgBandBiasLayer(4096).setAndFree((hdf5.readDataSet("param_1", "layer_40"))));
    add(new ActivationLayer(ActivationLayer.Mode.RELU));
    add(new ConvolutionLayer(1, 1, 4096, 1000).setPaddingXY(0, 0).setAndFree(hdf5.readDataSet("param_0", "layer_42").permuteDimensionsAndFree(fullyconnectedOrder)));
    add(new ImgBandBiasLayer(1000).setAndFree((hdf5.readDataSet("param_1", "layer_42"))));
}
Also used : ImgBandBiasLayer(com.simiacryptus.mindseye.layers.cudnn.ImgBandBiasLayer) SoftmaxActivationLayer(com.simiacryptus.mindseye.layers.cudnn.SoftmaxActivationLayer) ActivationLayer(com.simiacryptus.mindseye.layers.cudnn.ActivationLayer) ConvolutionLayer(com.simiacryptus.mindseye.layers.cudnn.ConvolutionLayer)

Example 12 with ImgBandBiasLayer

use of com.simiacryptus.mindseye.layers.cudnn.ImgBandBiasLayer in project MindsEye by SimiaCryptus.

the class DeepConvolution method addLayer.

@Override
public void addLayer(@Nonnull final PipelineNetwork network, final int[] in, final int[] out) {
    assert in[0] == out[0];
    assert in[1] == out[1];
    network.add(new ConvolutionLayer(radius, radius, in[2], out[2]).set(i -> random()));
    network.add(new ImgBandBiasLayer(out[2]));
    network.add(getActivation());
}
Also used : ConvolutionLayer(com.simiacryptus.mindseye.layers.cudnn.ConvolutionLayer) Util(com.simiacryptus.util.Util) ActivationLayer(com.simiacryptus.mindseye.layers.cudnn.ActivationLayer) Layer(com.simiacryptus.mindseye.lang.Layer) ImgBandBiasLayer(com.simiacryptus.mindseye.layers.cudnn.ImgBandBiasLayer) Nonnull(javax.annotation.Nonnull) ImgBandBiasLayer(com.simiacryptus.mindseye.layers.cudnn.ImgBandBiasLayer) ConvolutionLayer(com.simiacryptus.mindseye.layers.cudnn.ConvolutionLayer)

Aggregations

ImgBandBiasLayer (com.simiacryptus.mindseye.layers.cudnn.ImgBandBiasLayer)12 ConvolutionLayer (com.simiacryptus.mindseye.layers.cudnn.ConvolutionLayer)10 ActivationLayer (com.simiacryptus.mindseye.layers.cudnn.ActivationLayer)8 SoftmaxActivationLayer (com.simiacryptus.mindseye.layers.cudnn.SoftmaxActivationLayer)6 Nonnull (javax.annotation.Nonnull)4 Tensor (com.simiacryptus.mindseye.lang.Tensor)2 ImgMinSizeLayer (com.simiacryptus.mindseye.layers.cudnn.ImgMinSizeLayer)2 ImgModulusPaddingLayer (com.simiacryptus.mindseye.layers.cudnn.ImgModulusPaddingLayer)2 ImgReshapeLayer (com.simiacryptus.mindseye.layers.java.ImgReshapeLayer)2 Layer (com.simiacryptus.mindseye.lang.Layer)1 BandAvgReducerLayer (com.simiacryptus.mindseye.layers.cudnn.BandAvgReducerLayer)1 GramianLayer (com.simiacryptus.mindseye.layers.cudnn.GramianLayer)1 PoolingLayer (com.simiacryptus.mindseye.layers.cudnn.PoolingLayer)1 SquareActivationLayer (com.simiacryptus.mindseye.layers.cudnn.SquareActivationLayer)1 BiasLayer (com.simiacryptus.mindseye.layers.java.BiasLayer)1 FullyConnectedLayer (com.simiacryptus.mindseye.layers.java.FullyConnectedLayer)1 SoftmaxActivationLayer (com.simiacryptus.mindseye.layers.java.SoftmaxActivationLayer)1 PipelineNetwork (com.simiacryptus.mindseye.network.PipelineNetwork)1 Util (com.simiacryptus.util.Util)1 DoubleSupplier (java.util.function.DoubleSupplier)1