コード例 #1
0
  @Test
  public void testCNNInputSetupMNIST() throws Exception {
    INDArray input = getMnistData();
    Layer layer = getMNISTConfig();
    layer.activate(input);

    assertEquals(input, layer.input());
    assertArrayEquals(input.shape(), layer.input().shape());
  }
コード例 #2
0
  @Test
  public void testCNNInputSetup() throws Exception {
    INDArray input = getMnistData();
    int[] stride = new int[] {3, 3};
    int[] padding = new int[] {1, 1};

    Layer layer = getCNNConfig(nChannelsIn, depth, kernelSize, stride, padding);
    layer.activate(input);

    assertEquals(input, layer.input());
    assertEquals(input.shape(), layer.input().shape());
  }