Package ca.nengo.model.impl

Examples of ca.nengo.model.impl.NetworkImpl.addProjection()


    NEFEnsemble ensemble = ef.make("ensemble", 100, 1);
    ensemble.addDecodedTermination("input", MU.I(1), .005f, false);
    ensemble.collectSpikes(true);
    network.addNode(ensemble);
   
    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), ensemble.getTermination("input"));
    network.run(0, 2);
   
    SpikePattern unsorted = ensemble.getSpikePattern();
    SpikePattern sorted = DataUtils.sort(unsorted, ensemble);
   
View Full Code Here


            Network network = new NetworkImpl();
            network.addNode(ensemble);
            FunctionInput input = new FunctionInput("input", new Function[]{new SineFunction(3)}, Units.UNK);
            network.addNode(input);
            network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), ensemble.getTermination("input"));

            network.setMode(SimulationMode.RATE);
            Probe rates = network.getSimulator().addProbe("test", "rate", true);
            network.run(0, 2);
            //          Plotter.plot(rates.getData(), .05f, "rates");
View Full Code Here

   
    float tau = .05f;
   
    Termination interm = integrator.addDecodedTermination("input", new float[][]{new float[]{tau}}, tau, false);
//    Termination interm = integrator.addDecodedTermination("input", new float[][]{new float[]{1f}}, tau);
    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), interm);
   
    Termination fbterm = integrator.addDecodedTermination("feedback", new float[][]{new float[]{1f}}, tau, false);
    network.addProjection(integrator.getOrigin(NEFEnsemble.X), fbterm);
   
    //System.out.println("Network creation: " + (System.currentTimeMillis() - start));
View Full Code Here

    Termination interm = integrator.addDecodedTermination("input", new float[][]{new float[]{tau}}, tau, false);
//    Termination interm = integrator.addDecodedTermination("input", new float[][]{new float[]{1f}}, tau);
    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), interm);
   
    Termination fbterm = integrator.addDecodedTermination("feedback", new float[][]{new float[]{1f}}, tau, false);
    network.addProjection(integrator.getOrigin(NEFEnsemble.X), fbterm);
   
    //System.out.println("Network creation: " + (System.currentTimeMillis() - start));
    return network;
  }
   
View Full Code Here

//    Plotter.plot(biasedWeights[0], "some biased weights");
//    Plotter.plot(weights[1], "some more weights");
   
//    Plotter.plot(bt[0].getBiasEncoders(), "bias decoders");
   
    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), source.getTermination("input"));
    network.addProjection(source.getOrigin(NEFEnsemble.X), dest.getTermination("source"));
//*    network.addProjection(bo, bo.getInterneurons().getTermination("source"));
//*    network.addProjection(bo, bt[0]);
//*    network.addProjection(bo.getInterneurons().getOrigin(NEFEnsemble.X), bt[1]);
//    network.addProjection(zero.getOrigin(FunctionInput.ORIGIN_NAME), bt[1]);
View Full Code Here

//    Plotter.plot(weights[1], "some more weights");
   
//    Plotter.plot(bt[0].getBiasEncoders(), "bias decoders");
   
    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), source.getTermination("input"));
    network.addProjection(source.getOrigin(NEFEnsemble.X), dest.getTermination("source"));
//*    network.addProjection(bo, bo.getInterneurons().getTermination("source"));
//*    network.addProjection(bo, bt[0]);
//*    network.addProjection(bo.getInterneurons().getOrigin(NEFEnsemble.X), bt[1]);
//    network.addProjection(zero.getOrigin(FunctionInput.ORIGIN_NAME), bt[1]);
   
View Full Code Here

   
    NEFEnsemble post = ef.make("post", 200, 1, "nefe_post", false);
//    DecodedTermination baseTermination = (DecodedTermination) post.addDecodedTermination("pre", MU.I(1), tauPSC, false);
    network.addNode(post);
   
    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), pre.getTermination("input"));
    Projection projection = network.addProjection(pre.getOrigin(NEFEnsemble.X), post.getTermination("pre"));
   
    Probe pPost = network.getSimulator().addProbe("post", NEFEnsemble.X, true);
    network.run(0, 2);
    TimeSeries ideal = pPost.getData();
View Full Code Here

    NEFEnsemble post = ef.make("post", 200, 1, "nefe_post", false);
//    DecodedTermination baseTermination = (DecodedTermination) post.addDecodedTermination("pre", MU.I(1), tauPSC, false);
    network.addNode(post);
   
    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), pre.getTermination("input"));
    Projection projection = network.addProjection(pre.getOrigin(NEFEnsemble.X), post.getTermination("pre"));
   
    Probe pPost = network.getSimulator().addProbe("post", NEFEnsemble.X, true);
    network.run(0, 2);
    TimeSeries ideal = pPost.getData();
    Plotter.plot(pPost.getData(), .005f, "mixed weights result");   
View Full Code Here

//    Function f = new SineFunction((float) Math.PI, 1f / (float) Math.PI);
//    Plotter.plot(f, 0, .01f, 3, "input");
    FunctionInput input = new FunctionInput("input", new Function[]{f}, Units.UNK);
    network.addNode(input);

    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), t);

//    Probe rate = network.getSimulator().addProbe("neuron", "rate", true);
//    Probe N = network.getSimulator().addProbe("neuron", "N", true);
//    Probe dNdt = network.getSimulator().addProbe("neuron", "dNdt", true);
//    Probe I = network.getSimulator().addProbe("neuron", "I", true);
View Full Code Here

            network.addNode(ensemble);

            FunctionInput input = new FunctionInput("input", new Function[]{new PiecewiseConstantFunction(new float[]{0.2f}, new float[]{0, 0.5f})}, Units.UNK);
            network.addNode(input);

            network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), ensemble.getTermination("input"));

//          Probe vProbe = network.getSimulator().addProbe("ensemble", 0, "V", true);
//          Probe nProbe = network.getSimulator().addProbe("ensemble", 0, "N", true);
//          Probe iProbe = network.getSimulator().addProbe("ensemble", 0, "I", true);
            Probe rProbe = network.getSimulator().addProbe("ensemble", "rate", true);
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.