Donate Share

an Object Oriented Neural Engine

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

NullPointerExeptioon

You are viewing a single message from this topic. View all messages.

  1. 2008-10-29 11:04:36 UTC
    I found out. Forgot to setRows for hidden and output layer

    my whole working test case:

    @Test
    public void testNeuralNetDelay() {
    double[] data = { 1.0 };
    DelayLayer iLayer = new DelayLayer();
    iLayer.setLayerName("IN-DELAYED");
    Layer hLayer = new TanhLayer();
    hLayer.setLayerName("HID-TANH");
    Layer oLayer = new TanhLayer();
    oLayer.setLayerName("OUT-TANH");
    NeuralNet nn = new NeuralNet();

    iLayer = new DelayLayer();
    iLayer.setRows(1);
    iLayer.setTaps(4);

    hLayer.setRows(4);
    oLayer.setRows(1);

    FullSynapse synapse1 = new FullSynapse();
    FullSynapse synapse2 = new FullSynapse();

    iLayer.addOutputSynapse(synapse1);
    hLayer.addInputSynapse(synapse1);
    hLayer.addOutputSynapse(synapse2);
    oLayer.addInputSynapse(synapse2);

    nn.addLayer(iLayer, NeuralNet.INPUT_LAYER);
    nn.addLayer(hLayer, NeuralNet.HIDDEN_LAYER);
    nn.addLayer(oLayer, NeuralNet.OUTPUT_LAYER);

    double[] yyy = JooneTools.interrogate(nn, data);
    assert yyy.length == 1;

    }

    btw. IMO it would be nice if joone indicate that layer doesn't have any rows instead of bare NullPointer

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.