source: anac2020/BlingBling/src/main/java/geniusweb/blingbling/Ranknet/IdentityActivationFunction.java@ 14

Last change on this file since 14 was 1, checked in by wouter, 4 years ago

#1910 added anac2020 parties

File size: 509 bytes
Line 
1package geniusweb.blingbling.Ranknet;
2
3import org.nd4j.linalg.api.ndarray.INDArray;
4import org.nd4j.linalg.factory.Nd4j;
5
6public class IdentityActivationFunction implements IActivationFunction {
7 public static final IdentityActivationFunction INSTANCE = new IdentityActivationFunction();
8
9 private IdentityActivationFunction() { }
10
11 public INDArray output(INDArray input) {
12 return input;
13 }
14
15 public INDArray derivative(INDArray input) {
16 return Nd4j.ones(input.shape());
17 }
18}
Note: See TracBrowser for help on using the repository browser.