nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/ops/transforms/Transforms.java
public static INDArray hardTanhDerivative(INDArray ndArray, boolean dup) {
        return exec(dup ? new HardTanhDerivative(ndArray, ndArray.dup()) : new HardTanhDerivative(ndArray));
    }
public static INDArray hardTanhDerivative(INDArray ndArray, boolean dup) {
        return exec(dup ? new HardTanhDerivative(ndArray, ndArray.dup()) : new HardTanhDerivative(ndArray));
    }
public static INDArray hardTanhDerivative ( INDArray ndArray , boolean dup ) { return exec ( dup ? new HardTanhDerivative ( ndArray , ndArray . dup ( ) ) : new HardTanhDerivative ( ndArray ) ) ; }
Hard tanh

@param ndArray the input
@param dup     whether to duplicate the ndarray and return it as the result
@return the output
Hard tanh