@Test
public void testDimensions() {
// convolution dimensions
Environment.getInstance().setUseWeightsSharedMemory(true);
ConnectionFactory cf = new ConnectionFactory();
Conv2DConnection conv = cf.conv2d(new Layer(), new Layer(), 4, 4, 3, 2, 2, 2, 1);
assertEquals(3, conv.getOutputFeatureMapColumns(), 0);
assertEquals(3, conv.getOutputFeatureMapRows(), 0);
assertEquals(2, conv.getOutputFilters(), 0);
// subsampling dimensions
Subsampling2DConnection sub = cf.subsampling2D(new Layer(), new Layer(), 5, 5, 2, 2, 3);
assertEquals(2, sub.getOutputFeatureMapColumns(), 0);
assertEquals(2, sub.getOutputFeatureMapRows(), 0);
assertEquals(3, sub.getFilters(), 0);
}