Package ca.nengo.model.impl

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


      final NEFEnsemble ensemble = ef.make("ensemble", 200, 1);
      ensemble.collectSpikes(true);
      network.addNode(ensemble);
     
      FunctionInput input = new FunctionInput("input", new Function[]{new ConstantFunction(1, 1)}, Units.UNK);
      network.addNode(input);
     
      network.run(0, 1);
     
      Environment.setUserInterface(true);
      Memory.report("Before plots");
View Full Code Here


    };
    FunctionInput input = new FunctionInput("input", new Function[]{f}, Units.UNK);
//    FunctionInput zero = new FunctionInput("zero", new Function[]{new ConstantFunction(1, 0f)}, Units.UNK);
   
    Network network = new NetworkImpl();
    network.addNode(input);
    network.addNode(source);
    network.addNode(dest);

    source.addDecodedTermination("input", MU.I(1), .005f, false); //OK
    BiasOrigin bo = source.addBiasOrigin(source.getOrigin(NEFEnsemble.X), 200, "interneurons", true); //should have -ve bias decoders
View Full Code Here

    FunctionInput input = new FunctionInput("input", new Function[]{f}, Units.UNK);
//    FunctionInput zero = new FunctionInput("zero", new Function[]{new ConstantFunction(1, 0f)}, Units.UNK);
   
    Network network = new NetworkImpl();
    network.addNode(input);
    network.addNode(source);
    network.addNode(dest);

    source.addDecodedTermination("input", MU.I(1), .005f, false); //OK
    BiasOrigin bo = source.addBiasOrigin(source.getOrigin(NEFEnsemble.X), 200, "interneurons", true); //should have -ve bias decoders
    network.addNode(bo.getInterneurons()); //should be backwards response functions
View Full Code Here

//    FunctionInput zero = new FunctionInput("zero", new Function[]{new ConstantFunction(1, 0f)}, Units.UNK);
   
    Network network = new NetworkImpl();
    network.addNode(input);
    network.addNode(source);
    network.addNode(dest);

    source.addDecodedTermination("input", MU.I(1), .005f, false); //OK
    BiasOrigin bo = source.addBiasOrigin(source.getOrigin(NEFEnsemble.X), 200, "interneurons", true); //should have -ve bias decoders
    network.addNode(bo.getInterneurons()); //should be backwards response functions
//**    bo.getInterneurons().addDecodedTermination("source", MU.I(1), .005f, false);
View Full Code Here

    network.addNode(source);
    network.addNode(dest);

    source.addDecodedTermination("input", MU.I(1), .005f, false); //OK
    BiasOrigin bo = source.addBiasOrigin(source.getOrigin(NEFEnsemble.X), 200, "interneurons", true); //should have -ve bias decoders
    network.addNode(bo.getInterneurons()); //should be backwards response functions
//**    bo.getInterneurons().addDecodedTermination("source", MU.I(1), .005f, false);
   
//    Plotter.plot(bo.getInterneurons());
//    Plotter.plot(bo.getInterneurons(), NEFEnsemble.X);
   
View Full Code Here

        return from[0] - 1;
      }
    };
   
    FunctionInput input = new FunctionInput("input", new Function[]{f}, Units.UNK);
    network.addNode(input);
   
    NEFEnsembleFactory ef = new NEFEnsembleFactoryImpl();
    NEFEnsemble pre = ef.make("pre", 400, 1, "nefe_pre", false);
    pre.addDecodedTermination("input", MU.I(1), tauPSC, false);
//    DecodedOrigin baseOrigin = (DecodedOrigin) pre.getOrigin(NEFEnsemble.X);
View Full Code Here

   
    NEFEnsembleFactory ef = new NEFEnsembleFactoryImpl();
    NEFEnsemble pre = ef.make("pre", 400, 1, "nefe_pre", false);
    pre.addDecodedTermination("input", MU.I(1), tauPSC, false);
//    DecodedOrigin baseOrigin = (DecodedOrigin) pre.getOrigin(NEFEnsemble.X);
    network.addNode(pre);
   
    NEFEnsemble post = ef.make("post", 200, 1, "nefe_post", false);
//    DecodedTermination baseTermination = (DecodedTermination) post.addDecodedTermination("pre", MU.I(1), tauPSC, false);
    network.addNode(post);
   
View Full Code Here

//    DecodedOrigin baseOrigin = (DecodedOrigin) pre.getOrigin(NEFEnsemble.X);
    network.addNode(pre);
   
    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);
View Full Code Here

    NetworkImpl network = new NetworkImpl();
    LinearSynapticIntegrator integrator = new LinearSynapticIntegrator(.001f, Units.ACU);
    Termination t = integrator.addTermination("input", new float[]{1}, .005f, false);
    ALIFSpikeGenerator generator = new ALIFSpikeGenerator(.0005f, .02f, .2f, .05f);
    SpikingNeuron neuron = new SpikingNeuron(integrator, generator, 2, 5, "neuron");
    network.addNode(neuron);

    Function f = new PiecewiseConstantFunction(new float[]{1, 2}, new float[]{0, 1, -1});
//    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);
View Full Code Here

    Function f = new PiecewiseConstantFunction(new float[]{1, 2}, new float[]{0, 1, -1});
//    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);
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.