@Test public void testSigmoidActivation() { final Matrix activation = sigmoidActivationLayer.feedForward(input); assertTrue(expectedSigmoidActivation.compare(activation, TOLERANCE)); }
@Override public Matrix feedForward(final Matrix input) { return activationFunction.apply(input); }
ActivationLayer extends LayerBase { @Override public Matrix feedForward(final Matrix input) { return activationFunction.apply(input); } }
ActivationLayer extends LayerBase { @Override public Matrix feedForward(final Matrix input) { return activationFunction.apply(input); } @Inject private  ActivationLayer(@Parameter(LayerIndex.class) final int index,
                          @Parameter(LayerInputShape.class) final String inputShape,
                          @Parameter(ActivationFunction.class) final String activationFunction); }
ActivationLayer extends LayerBase { @Override public Matrix feedForward(final Matrix input) { return activationFunction.apply(input); } @Inject private  ActivationLayer(@Parameter(LayerIndex.class) final int index,
                          @Parameter(LayerInputShape.class) final String inputShape,
                          @Parameter(ActivationFunction.class) final String activationFunction); @Override int[] getOutputShape(); @Override boolean isLearnable(); @Override Matrix feedForward(final Matrix input); @Override Matrix backPropagate(final Matrix input, final Matrix activation, final Matrix nextError); @Override LayerParameter generateParameterGradient(final Matrix input, final Matrix error); }
ActivationLayer extends LayerBase { @Override public Matrix feedForward(final Matrix input) { return activationFunction.apply(input); } @Inject private  ActivationLayer(@Parameter(LayerIndex.class) final int index,
                          @Parameter(LayerInputShape.class) final String inputShape,
                          @Parameter(ActivationFunction.class) final String activationFunction); @Override int[] getOutputShape(); @Override boolean isLearnable(); @Override Matrix feedForward(final Matrix input); @Override Matrix backPropagate(final Matrix input, final Matrix activation, final Matrix nextError); @Override LayerParameter generateParameterGradient(final Matrix input, final Matrix error);  }