Package com.neuralnetwork.shared.layers

Examples of com.neuralnetwork.shared.layers.OutputLayer


        this.numOutputs = numOut;
        this.numHidden = numHide;
        this.height = numHide + 2;
        this.layerSizes = sizes;
        this.inputLayer = new InputLayer(numInputs);
        this.outputLayer = new OutputLayer(numOutputs);
        this.layers = new Stack<IHiddenLayer>();
        this.nnctx = new NeuralNetContext(this);
    }
View Full Code Here


     */
    public Network(final int numIn, final int numOut) {
        this.numInputs = numIn;
        this.numOutputs = numOut;
        this.inputLayer = new InputLayer(numInputs);
        this.outputLayer = new OutputLayer(numOutputs);
        this.layers = new Stack<IHiddenLayer>();
        this.nnctx = new NeuralNetContext(this);
    }
View Full Code Here

   */
  @Test
    public final void testSetOutputLayer() {
    INetwork n = new Network(FIVE, FIVE, THREE,
        new int[] {FOUR, TWO, FOUR});
    n.setOutputLayer(new OutputLayer(THREE));
    n.build();
    assertEquals(LayerType.OUTPUT, n.getOutputLayer().getLayerType());
    assertEquals(THREE, n.getOutputLayer().getSize());
  }
View Full Code Here

   */
  @Test(timeout = TIMEOUT)
  public final void testCreate() {
    IInputLayer l1 = new InputLayer(LAYER_SIZE);
    l1.build();
    IOutputLayer l2 = new OutputLayer(LAYER_SIZE);
    l2.build();
    Connections.getInstance().create(l1, l2);
   
    Iterator<IInputNeuron> iter1 = l1.iterator();
        INeuron tmp = null;
        while (iter1.hasNext()) {
            tmp = iter1.next();
            Iterator<IOutputNeuron> iter2 = l2.iterator();
            for (ILink l : tmp.getOutputLinks()) {
              if (iter2.hasNext()) {
                    assertEquals(l.getTail(), iter2.next());
              }
            }
View Full Code Here

     * Test method for {@link com.neuralnetwork
     * .shared.layers.OutputLayer#OutputLayer(int)}.
     */
    @Test
    public final void testOutputLayer() {
        IOutputLayer o = new OutputLayer(1);
        assertNotNull(o);
        assertEquals(o.getLayerType(), LayerType.OUTPUT);
    }
View Full Code Here

     * Test method for {@link com.neuralnetwork
     * .shared.layers.OutputLayer#build()}.
     */
    @Test
    public final void testBuild() {
        IOutputLayer l = new OutputLayer(1);
        ((IOutputLayer) l).build();
        int size = l.getSize();
        assertEquals(size, 1);
    }
View Full Code Here

TOP

Related Classes of com.neuralnetwork.shared.layers.OutputLayer

Copyright © 2018 www.massapicom. 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.