Package ca.nengo.model.impl

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


    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);
   
    Plotter.plot(unsorted);
View Full Code Here


            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");
            Plotter.plot(rates.getData(), "rates");
        } catch (StructuralException e) {
            e.printStackTrace();
        } catch (SimulationException e) {
View Full Code Here

      FunctionInput fi = new FunctionInput(name, funcs, Units.uAcm2);
      network.addNode(fi);
     
      //we can add a probe to it and run the simulator ...
      Probe p = network.getSimulator().addProbe(name, FunctionInput.STATE_NAME, true);     
      network.run(0, 10);
     
      JFrame frame = makeAnimPlotFrame("vector plot");
      frame.setLayout(new BorderLayout());
      Scope scope = new Scope(p);
      frame.getContentPane().add(scope.getGraphPanel(), BorderLayout.CENTER);
View Full Code Here

      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");
      for (int i = 0; i < 5; i++) {
        Thread pt = new Thread() {
View Full Code Here

   
//    Probe sourceProbe = network.getSimulator().addProbe("source", NEFEnsemble.X, true);
//    Probe destProbe = network.getSimulator().addProbe("dest", NEFEnsemble.X, true);
//    Probe interProbe = network.getSimulator().addProbe("source_X_bias_interneurons", NEFEnsemble.X, true);
   
    network.run(0, 2);
   
//    Plotter.plot(sourceProbe.getData(), "source");
//    Plotter.plot(destProbe.getData(), "dest");
//    Plotter.plot(interProbe.getData(), "interneurons");
  }
View Full Code Here

   
    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");   
   
    //remove negative weights ...
    System.out.println("Minimum weight without bias: " + MU.min(projection.getWeights()));
View Full Code Here

    //remove negative weights ...
    System.out.println("Minimum weight without bias: " + MU.min(projection.getWeights()));
    projection.addBias(100, .005f, tauPSC, true, false);
    System.out.println("Minimum weight with bias: " + MU.min(projection.getWeights()));
    pPost.reset();
    network.run(0, 2);
    TimeSeries diff = new TimeSeriesImpl(ideal.getTimes(), MU.difference(ideal.getValues(), pPost.getData().getValues()), ideal.getUnits());
    Plotter.plot(diff, .01f, "positive weights");
   
    projection.removeBias();
    projection.addBias(100, tauPSC/5f, tauPSC, true, true);
View Full Code Here

   
    projection.removeBias();
    projection.addBias(100, tauPSC/5f, tauPSC, true, true);
    pPost.reset();
    Probe pInter = network.getSimulator().addProbe("post:pre:interneurons", NEFEnsemble.X, true);
    network.run(0, 2);
    diff = new TimeSeriesImpl(ideal.getTimes(), MU.difference(ideal.getValues(), pPost.getData().getValues()), ideal.getUnits());
    Plotter.plot(diff, .01f, "positive weights optimized");
    Plotter.plot(pInter.getData(), .01f, "interneurons");

   
View Full Code Here

//    Probe dNdt = network.getSimulator().addProbe("neuron", "dNdt", true);
//    Probe I = network.getSimulator().addProbe("neuron", "I", true);

    setTau(neuron, .1f);
    network.setMode(SimulationMode.RATE);
    network.run(0, 3);

//    Plotter.plot(rate.getData(), "rate");
//    Plotter.plot(N.getData(), "N");
  }
View Full Code Here

//          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);

            network.setMode(SimulationMode.RATE);
            network.run(0, 1);

//          Plotter.plot(ensemble.getSpikePattern());
//          Plotter.plot(vProbe.getData(), "V");
//          Plotter.plot(nProbe.getData(), "N");
//          Plotter.plot(iProbe.getData(), "I");
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.