All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.expleague.ml.func.generic.ReLU Maven / Gradle / Ivy

There is a newer version: 1.4.9
Show newest version
package com.expleague.ml.func.generic;

import com.expleague.commons.math.AnalyticFunc;

/**
* User: solar
* Date: 27.05.15
* Time: 17:59
*/
public class ReLU extends AnalyticFunc.Stub {
  @Override
  public double gradient(double x) {
    return x > 0 ? 1 : 0;
  }

  @Override
  public double value(double x) {
    return x > 0 ? x : 0;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy