Shapes:
Layer 0 (ConvolutionLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 1 (SubsamplingLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 2 (ConvolutionLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 3 (ConvolutionLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 4 (SubsamplingLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 5 (ConvolutionLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 6 (ConvolutionLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 7 (SubsamplingLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 8 (ConvolutionLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 9 (ConvolutionLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 10 (SubsamplingLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 11 (ConvolutionLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 12 (ConvolutionLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 13 (DenseLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 14 (DenseLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Layer 15 (OutputLayer) output shape: Rank: 2, DataType: FLOAT, Offset: 0, Order: c, Shape: [1,3], Stride: [1,1]
Architecture:
MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()
.seed(seed)
.optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)
.updater(new Adam(0.0001))
.l2(0.0001)
.list()
.layer(0, new ConvolutionLayer.Builder()
.kernelSize(3,3) // dimensions of filters
.stride(1,1)
.padding(1,1)
.nOut(64) // number of filters
.activation(Activation.RELU)
.weightInit(WeightInit.RELU)
.build())
.layer(1, new SubsamplingLayer.Builder(SubsamplingLayer.PoolingType.MAX)
.kernelSize(2,2)
.stride(2,2)
.build())
.layer(2, new ConvolutionLayer.Builder()
.kernelSize(3,3)
.stride(1,1)
.padding(1,1)
.nOut(64)
.activation(Activation.RELU)
.weightInit(WeightInit.RELU)
.build())
.layer(3, new ConvolutionLayer.Builder()
.kernelSize(3,3)
.stride(1,1)
.padding(1,1)
.nOut(128)
.activation(Activation.RELU)
.weightInit(WeightInit.RELU)
.build())
.layer(4, new SubsamplingLayer.Builder(SubsamplingLayer.PoolingType.MAX)
.kernelSize(2,2)
.stride(2,2)
.build())
.layer(5, new ConvolutionLayer.Builder()
.kernelSize(3,3)
.stride(1,1)
.padding(1,1)
.nOut(256)
.activation(Activation.RELU)
.weightInit(WeightInit.RELU)
.build())
.layer(6, new ConvolutionLayer.Builder()
.kernelSize(3,3)
.stride(1,1)
.padding(1,1)
.nOut(256)
.activation(Activation.RELU)
.weightInit(WeightInit.RELU)
.build())
.layer(7, new SubsamplingLayer.Builder(SubsamplingLayer.PoolingType.MAX)
.kernelSize(2,2)
.stride(2,2)
.build())
.layer(8, new ConvolutionLayer.Builder()
.kernelSize(3,3)
.stride(1,1)
.padding(1,1)
.nOut(256)
.activation(Activation.RELU)
.weightInit(WeightInit.RELU)
.build())
.layer(9, new ConvolutionLayer.Builder()
.kernelSize(3,3)
.stride(1,1)
.padding(1,1)
.nOut(256)
.activation(Activation.RELU)
.weightInit(WeightInit.RELU)
.build())
.layer(10, new SubsamplingLayer.Builder(SubsamplingLayer.PoolingType.MAX)
.kernelSize(2,2)
.stride(2,2)
.build())
.layer(11, new ConvolutionLayer.Builder()
.kernelSize(3,3)
.stride(1,1)
.padding(1,1)
.nOut(256)
.activation(Activation.RELU)
.weightInit(WeightInit.RELU)
.build())
.layer(12, new ConvolutionLayer.Builder()
.kernelSize(3,3)
.stride(1,1)
.padding(1,1)
.nOut(512)
.activation(Activation.RELU)
.weightInit(WeightInit.RELU)
.build())
.layer(13, new DenseLayer.Builder()
.activation(Activation.RELU)
.nOut(128)
.weightInit(WeightInit.RELU)
.dropOut(0.3)
.build())
.layer(14, new DenseLayer.Builder()
.activation(Activation.RELU)
.nOut(32)
.weightInit(WeightInit.RELU)
.dropOut(0.3)
.build())
.layer(15, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)
.nIn(32)
.nOut(3)
.activation(Activation.SOFTMAX)
.build())
.setInputType(InputType.convolutional(image_height, image_width, color_channels))
.build();
model is trained on 48x48 greyscale facial images, from the fer-2013 dataset, but uses only happy, angry and sad emotions