Examples of fullyConnected()


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

      rbm.getProperties().setParameter(Constants.CONNECTION_FACTORY, cf);

      rbm.addConnections(cf.fullyConnected(result.getOutputLayer(), new Layer(), layers[i - 1], layers[i]));

      if (addBias) {
    rbm.addConnections(cf.fullyConnected(new Layer(), rbm.getVisibleLayer(), 1, layers[i - 1]));
    rbm.addConnections(cf.fullyConnected(new Layer(), rbm.getHiddenLayer(), 1, layers[i]));
      }

      result.addNeuralNetwork(rbm);
  }
View Full Code Here

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

      rbm.addConnections(cf.fullyConnected(result.getOutputLayer(), new Layer(), layers[i - 1], layers[i]));

      if (addBias) {
    rbm.addConnections(cf.fullyConnected(new Layer(), rbm.getVisibleLayer(), 1, layers[i - 1]));
    rbm.addConnections(cf.fullyConnected(new Layer(), rbm.getHiddenLayer(), 1, layers[i]));
      }

      result.addNeuralNetwork(rbm);
  }
View Full Code Here

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

    @Test
    public void testConnectionFactory() {
  Environment.getInstance().setUseWeightsSharedMemory(true);
  ConnectionFactory f = new ConnectionFactory();
  FullyConnected fc1 = f.fullyConnected(null, null, 2, 3);
  FullyConnected fc2 = f.fullyConnected(null, null, 5, 2);

  assertTrue(fc1.getWeights().getElements() == fc2.getWeights().getElements());
  assertEquals(16, fc1.getWeights().getElements().length, 0);
  assertEquals(0, fc1.getWeights().getStartOffset(), 0);
View Full Code Here

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

    @Test
    public void testConnectionFactory() {
  Environment.getInstance().setUseWeightsSharedMemory(true);
  ConnectionFactory f = new ConnectionFactory();
  FullyConnected fc1 = f.fullyConnected(null, null, 2, 3);
  FullyConnected fc2 = f.fullyConnected(null, null, 5, 2);

  assertTrue(fc1.getWeights().getElements() == fc2.getWeights().getElements());
  assertEquals(16, fc1.getWeights().getElements().length, 0);
  assertEquals(0, fc1.getWeights().getStartOffset(), 0);
  assertEquals(3, fc1.getWeights().getRows(), 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.