Package com.neuralnetwork.shared.layers

Examples of com.neuralnetwork.shared.layers.IInputLayer


   * #create(com.neuralnetwork.shared.layers.ILayer,
   * com.neuralnetwork.shared.layers.ILayer)}.
   */
  @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()) {
View Full Code Here


     * Test method for {@link com.neuralnetwork
     * .shared.layers.InputLayer#InputLayer(int)}.
     */
    @Test
    public final void testInputLayer() {
        IInputLayer l = new InputLayer(1);
        assertNotNull(l);
        assertEquals(l.getLayerType(), LayerType.INPUT);
    }
View Full Code Here

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

     * .shared.layers.InputLayer#addValue(
     * com.neuralnetwork.shared.values.IValue, int)}.
     */
    @Test
    public final void testAddValue() {
        IInputLayer l = new InputLayer(1);
        l.build();
        l.addValue(new OneValue(), 0);
        assertEquals(l.getNeuron(0).getValue(), new OneValue());
    }
View Full Code Here

        values.add(NN_INPUT_VALUE);
        values.add(NN_INPUT_VALUE);
        values.add(NN_INPUT_VALUE);
        values.add(NN_INPUT_VALUE);
       
        IInputLayer l = new InputLayer(Constants.FIVE);
        l.addValues(values);
        n.setInputLayer(l);
        INeuralNetContext nnctx = new NeuralNetContext(n);
        l.propagate(nnctx);
    }   
View Full Code Here

TOP

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

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.