Examples of addDecodedOrigin()


Examples of ca.nengo.model.nef.NEFEnsemble.addDecodedOrigin()

   * @throws StructuralException
   */
  public void testGetOutput() throws StructuralException {
    NEFEnsembleFactory ef = new NEFEnsembleFactoryImpl();
    NEFEnsemble ensemble = ef.make("test", 70, new float[]{1, 1, 1});
    DecodedOrigin origin = (DecodedOrigin) ensemble.addDecodedOrigin("test",
        new Function[]{new PostfixFunction("x1", 3), new PostfixFunction("x2", 3)}, Neuron.AXON);
   
    float[][] input = MU.uniform(500, 3, 1);
    float[][] directOutput = NEFUtil.getOutput(origin, input, SimulationMode.DIRECT);
    float[][] constantOutput = NEFUtil.getOutput(origin, input, SimulationMode.CONSTANT_RATE);
View Full Code Here

Examples of ca.nengo.model.nef.NEFEnsemble.addDecodedOrigin()

    output.addDecodedTermination("recurrent", m, .005f, false);

    Function[] clipped = new Function[] { new Clip(5, 0, 0f, 1f),
        new Clip(5, 1, 0f, 1f), new Clip(5, 2, 0f, 1f),
        new Clip(5, 3, 0f, 1f), new Clip(5, 4, 0f, 1f) };
    output.addDecodedOrigin("recurrent", clipped, Neuron.AXON);

    net.addProjection(output.getOrigin("recurrent"), output
        .getTermination("recurrent"));

    /*
 
View Full Code Here

Examples of ca.nengo.model.nef.NEFEnsemble.addDecodedOrigin()

    for (int i = 0; i < n; i++) {
      SpikingNeuron neuron = (SpikingNeuron) result.getNodes()[i];
      neuron.setBias(1-neuron.getScale());
    }

    DecodedOrigin o = (DecodedOrigin) result.addDecodedOrigin(NEFEnsemble.X, new Function[]{f}, Neuron.AXON);

    float[][] decoders = o.getDecoders();
    for (int i = 0; i < n; i++) {
      decoders[i] = new float[]{1f / n / 300};
    }
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.