Package ca.nengo.model.neuron.impl

Examples of ca.nengo.model.neuron.impl.SpikingNeuron


        NEFEnsembleFactoryImpl ef = new NEFEnsembleFactoryImpl();
        NEFEnsembleImpl c = (NEFEnsembleImpl)ef.make("c", 10, 1);

        LinearExponentialTermination[] nodeterms = new LinearExponentialTermination[10];
        for(int i = 0; i < nodeterms.length; i++) {
            nodeterms[i] = new LinearExponentialTermination(new SpikingNeuron(null, null, 0.0f, 0.0f, null), null, transform[i], 0.0f);
        }

        PlasticEnsembleTermination term = new PESTermination(c, null, nodeterms);
        float[][] rettransform = term.getTransform();
View Full Code Here


        NEFEnsembleFactoryImpl ef = new NEFEnsembleFactoryImpl();
        NEFEnsembleImpl c = (NEFEnsembleImpl)ef.make("c", 10, 1);

        LinearExponentialTermination[] nodeterms = new LinearExponentialTermination[10];
        for(int i = 0; i < nodeterms.length; i++) {
            nodeterms[i] = new LinearExponentialTermination(new SpikingNeuron(null, null, 0.0f, 0.0f, null), null, transform[i], 0.0f);
        }

        PlasticEnsembleTermination term = new PESTermination(c, null, nodeterms);
        term.setTransform(newtransform, true);
View Full Code Here

    Node[] neurons = pop.getNodes();
    int numDead = 0;
   
    for(int i = 0; i < neurons.length; i++)
    {
      SpikingNeuron n = (SpikingNeuron)neurons[i];
      if(n.getBias() == 0.0f && n.getScale() == 0.0f)
        numDead++;
    }
   
    return numDead;
  }
View Full Code Here

 
  protected void setUp() throws Exception {
    super.setUp();
    myIntegrator = new LinearSynapticIntegrator(.001f, Units.ACU);
    myGenerator = new LIFSpikeGenerator(.001f, .01f, .001f);
    myNeuron = new SpikingNeuron(myIntegrator, myGenerator, 1, 0, "test");   
  }
View Full Code Here

    Node[] neurons = pop.getNodes();
    int numDead = 0;
   
    for(int i = 0; i < neurons.length; i++)
    {
      SpikingNeuron n = (SpikingNeuron)neurons[i];
      if(n.getBias() == 0.0f && n.getScale() == 0.0f)
        numDead++;
    }
   
    return numDead;
  }
View Full Code Here

    public PreLearnTermination(NEFEnsemble ensemble, String name, PlasticNodeTermination[] nodeTerminations) throws StructuralException {
        super(ensemble, name, nodeTerminations);
        myEncoders = ensemble.getEncoders();
        myGain = new float[nodeTerminations.length];
        for (int i = 0; i < nodeTerminations.length; i++) {
            SpikingNeuron neuron = (SpikingNeuron) nodeTerminations[i].getNode();
            myGain[i] = neuron.getScale();
        }
    }
View Full Code Here

    for(int i = 0; i < nodes.length; i++){
      neurons[i] = (SpikingNeuron) nodes[i];
    }

    SpikingNeuron neuron = neurons[0];
    SpikeGeneratorOrigin origin;
    try {
      origin = (SpikeGeneratorOrigin) neuron.getOrigin(Neuron.AXON);
    } catch (StructuralException e) {
      e.printStackTrace();
      return null;
    }

    LIFSpikeGenerator generator = (LIFSpikeGenerator) origin.getGenerator();

    neuronData[1] = generator.getTauRC();
    neuronData[2] = generator.getTauRef();
    if (myPlasticEnsembleTerminations.size() > 0) {
      neuronData[3] = neuron.getTerminations()[0].getTau();
    } else {
      neuronData[3] = 0;
    }
    neuronData[4] = generator.getMaxTimeStep();
View Full Code Here

        }

    for (Node neuron : neurons) {
      if(rand.nextFloat() < killrate)
      {
        SpikingNeuron n = (SpikingNeuron)neuron;
        n.setBias(0.0f);
        n.setScale(0.0f);
      }
    }
  }
View Full Code Here

    public PESTermination(NEFEnsemble ensemble, String name, PlasticNodeTermination[] nodeTerminations) throws StructuralException {
        super(ensemble, name, nodeTerminations);
        myEncoders = ensemble.getEncoders();
        myGain = new float[nodeTerminations.length];
        for (int i = 0; i < nodeTerminations.length; i++) {
            SpikingNeuron neuron = (SpikingNeuron) nodeTerminations[i].getNode();
            myGain[i] = neuron.getScale();
        }
       
        calcScaledEncoders();
    }
View Full Code Here

        super(node, name, nodeTerminations);
        setOriginName(Neuron.AXON);
       
        myGain = new float[nodeTerminations.length];
        for (int i = 0; i < nodeTerminations.length; i++) {
            SpikingNeuron neuron = (SpikingNeuron) nodeTerminations[i].getNode();
            myGain[i] = neuron.getScale();
        }
       
        // If initial theta not passed in, randomly generate
        if (initialTheta == null) {
          IndicatorPDF uniform = new IndicatorPDF(0.00001f, 0.00002f);
View Full Code Here

TOP

Related Classes of ca.nengo.model.neuron.impl.SpikingNeuron

Copyright © 2018 www.massapicom. 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.