APISonar


org.nd4j.autodiff.functions.DifferentialFunctionFactory.log

> org > nd4j > autodiff > functions > DifferentialFunctionFactory > log
org APIs nd4j APIs autodiff APIs functions APIs DifferentialFunctionFactory APIs log APIs

Example 1
private DifferentialFunctionFactory functionFactory;

    public SDVariable log(String name, SDVariable iX) {
        SDVariable result = functionFactory.log(iX);
        return updateVariableNameAndReference(result, name);

    }
Example 2
public static List<SDVariable> grad(DifferentialFunctionFactory f, SDVariable arg, SDVariable grad, int[] dimensions){
        SDVariable logx = f.log(arg);
        SDVariable xLogX = arg.mul(logx);
        SDVariable sumBp = f.sumBp(xLogX, grad.neg(), false, dimensions);
        return Collections.singletonList(sumBp.mul(logx.add(1.0)));
    }