Examples of Neuron


Examples of ca.nengo.model.neuron.Neuron

            if (getUINode(node) == null) {
                UINeoNode nodeUI = currentNodes.get(node);

                if (nodeUI == null) {
                  if (node instanceof Neuron) {
                Neuron neuron = (Neuron) node;

                UINeuron neuronUI = new UINeuron(neuron);

                addUINode(neuronUI, false, false);
              } else if (node instanceof Ensemble) {
View Full Code Here

Examples of cnslab.cnsnetwork.Neuron

     
// TODO:  discarding first instance due known initialization bug (bug 1)     
     
new SIFNeuron ( sifNeuronPara );
     
      final Neuron  neuron = new SIFNeuron ( sifNeuronPara );
     
      // interface Neuron accessor methods
     
      // SIFNeuron is not a sensory neuron
     
      assertFalse ( neuron.isSensory ( ) );
     
      final double [ ]  currents = neuron.getCurr ( 0 );
     
      assertNotNull ( currents );
     
      // SIFNeuron has 2 currents:  excitatory and inhibitory
     
      assertEquals ( 2, currents.length );     
     
      // LOGGER.debug ( "excitatory current ...:  {}", currents [ 0 ] );
     
      // LOGGER.debug ( "inhibitory current ...:  {}", currents [ 1 ] );
     
      // Initially the currents should be zero
     
      assertEquals ( 0, currents [ 0 ], 0 );
     
      assertEquals ( 0, currents [ 1 ], 0 );
     
      final double  membraneVoltage = neuron.getMemV ( 0 );
     
      // LOGGER.debug ( "membrane voltage .....:  {}", membraneVoltage );
     
      // Initially the membrane voltage should be zero
     
      assertEquals ( 0, membraneVoltage, 0 );
     
      final boolean  record = neuron.getRecord ( );
     
      assertFalse ( record );
     
      final long  targetHost = neuron.getTHost ( );
     
      assertEquals ( 0, targetHost );
     
      final double  timeOfNextFire = neuron.getTimeOfNextFire ( );
     
      // LOGGER.debug ( "time of next fire ....:  {}", timeOfNextFire );
     
      assertEquals ( -1, timeOfNextFire, 0 );
     
      final boolean  realFire = neuron.realFire ( );
     
      assertTrue ( realFire );
    }
View Full Code Here

Examples of com.ansj.vec.domain.Neuron

                }
                String[] strs = temp.split(" ");
                wordCount += strs.length;
                List<WordNeuron> sentence = new ArrayList<WordNeuron>();
                for (int i = 0; i < strs.length; i++) {
                    Neuron entry = wordMap.get(strs[i]);
                    if (entry == null) {
                        continue;
                    }
                    // The subsampling randomly discards frequent words while keeping the ranking same
                    if (sample > 0) {
View Full Code Here

Examples of com.greentea.relaxation.jnmf.model.Neuron

      {
         isFirstStep = false;
         Layer lastLayer = builder.getNetwork().getLayers().getLast();
         for (int i = 0; i < targetImage.length(); ++i)
         {
            Neuron owner = lastLayer.getNeurons().get(i);
            Double value = targetImage.charAt(i) == '0' ? -1.0 : 1.0;
            owner.getOutputSynapses().get(0).sendSignal(owner, value);
//            ThresholdFunction function
//               = (ThresholdFunction) owner.getActivationFunction();
//            function.setThresholdValue(getValue);
         }
      }
View Full Code Here

Examples of com.greentea.relaxation.jnmf.model.Neuron

            row.add(inputColumns.get(j).getName());

            double sum = 0;
            for (int i = 0; i < outputNeuronsCount; ++i)
            {
               Neuron neuron = network.getLayers().getLast().getNeurons().get(i);

               double w = neuron.getInputSynapses().get(j).getWeight();
               sum += w;

               row.add(JNMFMathUtils.roundDouble4(w));
            }
View Full Code Here

Examples of com.greentea.relaxation.jnmf.model.Neuron

   }

   public DoubleList resolveClusterCenter(int clusterNum)
   {
      Layer lastLayer = getNetwork().getLayers().getLast();
      Neuron clusterNeuron = lastLayer.getNeurons().get(clusterNum);

      DoubleList res = new ArrayDoubleList(clusterNeuron.getInputSynapses().size());
      for (Synapse s : clusterNeuron.getInputSynapses())
      {
         res.add(s.getWeight());
      }

      return res;
View Full Code Here

Examples of com.greentea.relaxation.jnmf.model.Neuron

      {
         addOutputNeuron();
         return;
      }

      Neuron winner = null;
      double minF = Double.MAX_VALUE;

      for (Neuron neuron : outputNeurons)
      {
         if (neuron.getActivation() < minF)
View Full Code Here

Examples of com.greentea.relaxation.jnmf.model.Neuron

      {
         super.afterStep();

         for (int i = 0; i < outputNeurons.size(); ++i)
         {
            Neuron neuron = outputNeurons.get(i);
            double targetValue = getCurrentLearningPair().getOutput().get(i);

            casCorMath.collectInfoFromOutput(neuron, targetValue);

            if (learningOutputsAlgorithm == LearningOutputsAlgorithm.BACK_PROPAGATION)
            {
               backPropagation.learnNeuron(neuron, targetValue);
            }
         }

         if (learningOutputsAlgorithm == LearningOutputsAlgorithm.QUICK_PROPAGATION)
         {
            quickPropagation.collectInfoFromOutputs(getCurrentLearningPair().getOutput());
         }
      }
      else if (currentState == CasCorState.CANDIDATES_COLLECT_INFO)
      {
         for (int i = 0; i < outputNeurons.size(); ++i)
         {
            Neuron neuron = outputNeurons.get(i);
            double targetValue = getCurrentLearningPair().getOutput().get(i);

            casCorMath.collectInfoFromOutput(neuron, targetValue);
         }
View Full Code Here

Examples of com.greentea.relaxation.jnmf.model.Neuron

      double shrinkFactor = maxFactor / (1.0 + maxFactor);

      for (int i = 0; i < getOutputNeurons().size(); ++i)
      {
         Neuron neuron = getOutputNeurons().get(i);

         double connectionsCount = neuron.getInputSynapses().size();
         for (Synapse s : neuron.getInputSynapses())
         {
            double nextStep = 0;

            double slope = getSlope(s);
            double prevSlope = getPrevSlope(s);
View Full Code Here

Examples of com.greentea.relaxation.jnmf.model.Neuron

   public void collectInfoFromOutputs(DoubleList targetValues)
   {
      for (int i = 0; i < getOutputNeurons().size(); ++i)
      {
         Neuron neuron = getOutputNeurons().get(i);

         double activation = neuron.getActivation();
         double e = calcError(targetValues.get(i), activation);
         double net = neuron.getNet();

         IFunction deriviative = neuron.getActivationFunction().getDerivative();
         double deriviativeValue = deriviative.calc(net);

         for (Synapse s : neuron.getInputSynapses())
         {
            slopes.put(s, getSlope(s) + (e * deriviativeValue * s.getSource().getActivation()));
         }
      }
   }
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.