@Test public void testReset(){ neuron.setError(TEST_DOUBLE_VALUE); boolean failFlag = false; try{ verifyNeuronResetState(neuron); failFlag = true; } catch(AssertionError error){} if(failFlag){ fail("Neuron should not be in state equal to reset."); } neuron.reset(); verifyNeuronResetState(neuron); }
public void reset() { final double max = 0.5; final double min = -0.5; final int inputsCount = inputDim + 1; errorValue = 0; neuronInput = 0; neuronOutput = 0; Arrays.fill(deltaValues, 0); for (int i = 0; i < inputsCount; i++) { inputWeights[i] = random.nextDouble() * (max - min) + min; } }
Neuron implements Serializable { public void reset() { final double max = 0.5; final double min = -0.5; final int inputsCount = inputDim + 1; errorValue = 0; neuronInput = 0; neuronOutput = 0; Arrays.fill(deltaValues, 0); for (int i = 0; i < inputsCount; i++) { inputWeights[i] = random.nextDouble() * (max - min) + min; } } }
Neuron implements Serializable { public void reset() { final double max = 0.5; final double min = -0.5; final int inputsCount = inputDim + 1; errorValue = 0; neuronInput = 0; neuronOutput = 0; Arrays.fill(deltaValues, 0); for (int i = 0; i < inputsCount; i++) { inputWeights[i] = random.nextDouble() * (max - min) + min; } } Neuron(final ActivationFunction function, int inputDim, double biasValue);  Neuron(final ActivationFunction function, int inputDim, double biasValue, final Random random);  Neuron(final ActivationFunction function, int inputDim, double biasValue, final Collection<Neuron> nextNeurons); }
Neuron implements Serializable { public void reset() { final double max = 0.5; final double min = -0.5; final int inputsCount = inputDim + 1; errorValue = 0; neuronInput = 0; neuronOutput = 0; Arrays.fill(deltaValues, 0); for (int i = 0; i < inputsCount; i++) { inputWeights[i] = random.nextDouble() * (max - min) + min; } } Neuron(final ActivationFunction function, int inputDim, double biasValue);  Neuron(final ActivationFunction function, int inputDim, double biasValue, final Random random);  Neuron(final ActivationFunction function, int inputDim, double biasValue, final Collection<Neuron> nextNeurons); ActivationFunction getActivationFunction(); double[] getWeights(); double getError(); void setError(double error); double[] getDeltas(); double processInput(final double[] inputs); double getOutput(); double getNeuronInput(); double getBiasInput(); boolean addNeuron(Neuron neuron); boolean addAllNeurons(Collection<Neuron> neurons); boolean removeNeuron(Neuron neuron); void reset(); }
Neuron implements Serializable { public void reset() { final double max = 0.5; final double min = -0.5; final int inputsCount = inputDim + 1; errorValue = 0; neuronInput = 0; neuronOutput = 0; Arrays.fill(deltaValues, 0); for (int i = 0; i < inputsCount; i++) { inputWeights[i] = random.nextDouble() * (max - min) + min; } } Neuron(final ActivationFunction function, int inputDim, double biasValue);  Neuron(final ActivationFunction function, int inputDim, double biasValue, final Random random);  Neuron(final ActivationFunction function, int inputDim, double biasValue, final Collection<Neuron> nextNeurons); ActivationFunction getActivationFunction(); double[] getWeights(); double getError(); void setError(double error); double[] getDeltas(); double processInput(final double[] inputs); double getOutput(); double getNeuronInput(); double getBiasInput(); boolean addNeuron(Neuron neuron); boolean addAllNeurons(Collection<Neuron> neurons); boolean removeNeuron(Neuron neuron); void reset();  }