本文整理匯總了Java中org.nd4j.linalg.api.ops.impl.transforms.Sigmoid類的典型用法代碼示例。如果您正苦於以下問題:Java Sigmoid類的具體用法?Java Sigmoid怎麽用?Java Sigmoid使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Sigmoid類屬於org.nd4j.linalg.api.ops.impl.transforms包,在下文中一共展示了Sigmoid類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: feedForward
import org.nd4j.linalg.api.ops.impl.transforms.Sigmoid; //導入依賴的package包/類
private INDArray feedForward(INDArray a) {
for (int i = 0; i < biases.size(); i++) {
INDArray w = weights.get(i);
INDArray b = biases.get(i);
a = Nd4j.getExecutioner().execAndReturn(new Sigmoid(w.mmul(a).add(b)));
}
return a;
}
示例2: testupdateGraphFromProfiler
import org.nd4j.linalg.api.ops.impl.transforms.Sigmoid; //導入依賴的package包/類
@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();
}
示例3: runOp
import org.nd4j.linalg.api.ops.impl.transforms.Sigmoid; //導入依賴的package包/類
@Override
public void runOp() {
Nd4j.getExecutioner().exec(new Sigmoid(arr),1);
}
示例4: backprop
import org.nd4j.linalg.api.ops.impl.transforms.Sigmoid; //導入依賴的package包/類
@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);
}
示例5: getActivation
import org.nd4j.linalg.api.ops.impl.transforms.Sigmoid; //導入依賴的package包/類
@Override
public INDArray getActivation(INDArray in, boolean training) {
Nd4j.getExecutioner().execAndReturn(new Sigmoid(in));
return in;
}