Examples of conv2d()


Examples of com.github.neuralnetworks.architecture.ConnectionFactory.conv2d()

      }
        }
    }

    if (l.length == 4) {
        Conv2DConnection c = cf.conv2d(prev, newLayer = new Layer(), inputFMRows, inputFMCols, filters, l[0], l[1], l[2], l[3]);
        if (addBias) {
      cf.conv2d(biasLayer = new Layer(), newLayer, c.getOutputFeatureMapRows(), c.getOutputFeatureMapColumns(), 1, 1, 1, l[2], l[3]);
        }

        prevUnitCount = c.getOutputUnitCount();
View Full Code Here

Examples of com.github.neuralnetworks.architecture.ConnectionFactory.conv2d()

    }

    if (l.length == 4) {
        Conv2DConnection c = cf.conv2d(prev, newLayer = new Layer(), inputFMRows, inputFMCols, filters, l[0], l[1], l[2], l[3]);
        if (addBias) {
      cf.conv2d(biasLayer = new Layer(), newLayer, c.getOutputFeatureMapRows(), c.getOutputFeatureMapColumns(), 1, 1, 1, l[2], l[3]);
        }

        prevUnitCount = c.getOutputUnitCount();
    } else if (l.length == 2) {
        Subsampling2DConnection c = cf.subsampling2D(prev, newLayer = new Layer(), inputFMRows, inputFMCols, l[0], l[1], filters);
View Full Code Here

Examples of com.github.neuralnetworks.architecture.ConnectionFactory.conv2d()

  assertEquals(2, fc2.getWeights().getRows(), 0);
  assertEquals(5, fc2.getWeights().getColumns(), 0);
  fc2.getWeights().set(5, 1, 1);
  assertEquals(5, fc2.getWeights().get(1, 1), 0);

  Conv2DConnection c = f.conv2d(null, null, 3, 3, 3, 2, 2, 3, 1);
  assertEquals(52, c.getWeights().getElements().length, 0);
  assertEquals(36, c.getWeights().getSize(), 0);
  assertEquals(16, c.getWeights().getStartOffset(), 0);
  assertEquals(4, c.getWeights().getDimensions().length, 0);
    }
View Full Code Here

Examples of com.github.neuralnetworks.architecture.ConnectionFactory.conv2d()

    @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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.