use of org.nd4j.linalg.api.ops.impl.transforms.Sigmoid in project nd4j by deeplearning4j.
the class SameDiffOpExecutionerTest method testupdateGraphFromProfiler.
@Test
public void testupdateGraphFromProfiler() {
SameDiffOpExecutioner sameDiffOpExecutioner = new SameDiffOpExecutioner();
Nd4j.getExecutioner().setProfilingMode(OpExecutioner.ProfilingMode.ALL);
Nd4j.getExecutioner().exec(new Sigmoid(Nd4j.scalar(1.0)));
SameDiff sameDiff = sameDiffOpExecutioner.getSameDiff();
}
use of org.nd4j.linalg.api.ops.impl.transforms.Sigmoid in project nd4j by deeplearning4j.
the class ActivationSoftPlus method backprop.
@Override
public Pair<INDArray, INDArray> backprop(INDArray in, INDArray epsilon) {
INDArray dLdz = Nd4j.getExecutioner().execAndReturn(new Sigmoid(in));
dLdz.muli(epsilon);
return new Pair<>(dLdz, null);
}
Aggregations