private ImageConverter() {}
@Test
    public void testImageConverter() {
        ImmutableFeatureMap fmap = constructFeatureMap();
        Example<MockOutput> e = constructExample();

        // 3,3,2
        ImageConverter first = new ImageConverter("test",3,3,2);
        FloatNdArray ndarray = (TFloat32) first.convert(e,fmap).getMap().get("test");
        assertEquals( 0, ndarray.getFloat(0,0,0,0), 1e-10);
        assertEquals( 1, ndarray.getFloat(0,0,0,1), 1e-10);
        assertEquals( 2, ndarray.getFloat(0,0,1,0), 1e-10);
        assertEquals( 3, ndarray.getFloat(0,0,1,1), 1e-10);
        assertEquals( 0, ndarray.getFloat(0,0,2,0), 1e-10);
        assertEquals( 5, ndarray.getFloat(0,0,2,1), 1e-10);
        assertEquals( 6, ndarray.getFloat(0,1,0,0), 1e-10);
        assertEquals( 7, ndarray.getFloat(0,1,0,1), 1e-10);
        assertEquals( 8, ndarray.getFloat(0,1,1,0), 1e-10);
        assertEquals( 9, ndarray.getFloat(0,1,1,1), 1e-10);
        assertEquals(10, ndarray.getFloat(0,1,2,0), 1e-10);
        assertEquals(11, ndarray.getFloat(0,1,2,1), 1e-10);
        assertEquals(12, ndarray.getFloat(0,2,0,0), 1e-10);
        assertEquals( 0, ndarray.getFloat(0,2,0,1), 1e-10);
        assertEquals(14, ndarray.getFloat(0,2,1,0), 1e-10);
        assertEquals(15, ndarray.getFloat(0,2,1,1), 1e-10);
        assertEquals(16, ndarray.getFloat(0,2,2,0), 1e-10);
        assertEquals(17, ndarray.getFloat(0,2,2,1), 1e-10);

        // 3,2,3
        ImageConverter second = new ImageConverter("test",3,2,3);
        ndarray = (TFloat32) second.convert(e,fmap).getMap().get("test");
        assertEquals( 0, ndarray.getFloat(0,0,0,0),1e-10);
        assertEquals( 1, ndarray.getFloat(0,0,0,1),1e-10);
        assertEquals( 2, ndarray.getFloat(0,0,0,2),1e-10);
        assertEquals( 3, ndarray.getFloat(0,0,1,0),1e-10);
        assertEquals( 0, ndarray.getFloat(0,0,1,1),1e-10);
        assertEquals( 5, ndarray.getFloat(0,0,1,2),1e-10);
        assertEquals( 6, ndarray.getFloat(0,1,0,0),1e-10);
        assertEquals( 7, ndarray.getFloat(0,1,0,1),1e-10);
        assertEquals( 8, ndarray.getFloat(0,1,0,2),1e-10);
        assertEquals( 9, ndarray.getFloat(0,1,1,0),1e-10);
        assertEquals(10, ndarray.getFloat(0,1,1,1),1e-10);
        assertEquals(11, ndarray.getFloat(0,1,1,2),1e-10);
        assertEquals(12, ndarray.getFloat(0,2,0,0),1e-10);
        assertEquals( 0, ndarray.getFloat(0,2,0,1),1e-10);
        assertEquals(14, ndarray.getFloat(0,2,0,2),1e-10);
        assertEquals(15, ndarray.getFloat(0,2,1,0),1e-10);
        assertEquals(16, ndarray.getFloat(0,2,1,1),1e-10);
        assertEquals(17, ndarray.getFloat(0,2,1,2),1e-10);

        // 2,3,3
        ImageConverter third = new ImageConverter("test",2,3,3);
        ndarray = (TFloat32) third.convert(e,fmap).getMap().get("test");
        assertEquals( 0, ndarray.getFloat(0,0,0,0),1e-10);
        assertEquals( 1, ndarray.getFloat(0,0,0,1),1e-10);
        assertEquals( 2, ndarray.getFloat(0,0,0,2),1e-10);
        assertEquals( 3, ndarray.getFloat(0,0,1,0),1e-10);
        assertEquals( 0, ndarray.getFloat(0,0,1,1),1e-10);
        assertEquals( 5, ndarray.getFloat(0,0,1,2),1e-10);
        assertEquals( 6, ndarray.getFloat(0,0,2,0),1e-10);
        assertEquals( 7, ndarray.getFloat(0,0,2,1),1e-10);
        assertEquals( 8, ndarray.getFloat(0,0,2,2),1e-10);
        assertEquals( 9, ndarray.getFloat(0,1,0,0),1e-10);
        assertEquals(10, ndarray.getFloat(0,1,0,1),1e-10);
        assertEquals(11, ndarray.getFloat(0,1,0,2),1e-10);
        assertEquals(12, ndarray.getFloat(0,1,1,0),1e-10);
        assertEquals( 0, ndarray.getFloat(0,1,1,1),1e-10);
        assertEquals(14, ndarray.getFloat(0,1,1,2),1e-10);
        assertEquals(15, ndarray.getFloat(0,1,2,0),1e-10);
        assertEquals(16, ndarray.getFloat(0,1,2,1),1e-10);
        assertEquals(17, ndarray.getFloat(0,1,2,2),1e-10);
    }