public abstract class DoubleUnaryOpVertex extends DoubleVertex implements NonProbabilistic<DoubleTensor>
Modifier and Type | Field and Description |
---|---|
protected DoubleVertex |
inputVertex |
Constructor and Description |
---|
DoubleUnaryOpVertex(DoubleVertex inputVertex)
A vertex that performs a user defined operation on a single input vertex
|
DoubleUnaryOpVertex(int[] shape,
DoubleVertex inputVertex)
A vertex that performs a user defined operation on a single input vertex
|
Modifier and Type | Method and Description |
---|---|
DoubleTensor |
calculate() |
DualNumber |
calculateDualNumber(java.util.Map<Vertex,DualNumber> dualNumbers) |
protected abstract DualNumber |
dualOp(DualNumber dualNumber) |
protected abstract DoubleTensor |
op(DoubleTensor value) |
DoubleTensor |
sample(KeanuRandom random) |
abs, acos, asin, atan, atan2, ceil, concat, cos, div, div, divideBy, divideBy, equalTo, exp, floor, getValue, greaterThan, greaterThanOrEqualTo, lambda, lambda, lessThan, lessThanOrEqualTo, log, matrixInverse, matrixMultiply, minus, minus, multiply, multiply, notEqualTo, observe, observe, plus, plus, pow, pow, reshape, reverseModeAutoDifferentiation, round, setAndCascade, setAndCascade, setValue, setValue, sigmoid, sin, slice, sum, take, tan, times, times, unaryMinus
addChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getId, getIndentation, getLabel, getObservedValue, getParents, getRawValue, getShape, getValue, hashCode, hasValue, isObserved, isProbabilistic, labeledAs, lazyEval, observe, observeOwnValue, sample, setAndCascade, setLabel, setParents, setParents, setValue, toString, unobserve
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contradictsObservation
getObservedValue, isObserved, observableTypeFor, observe, unobserve
getDualNumber
protected final DoubleVertex inputVertex
public DoubleUnaryOpVertex(DoubleVertex inputVertex)
inputVertex
- the input vertexpublic DoubleUnaryOpVertex(int[] shape, DoubleVertex inputVertex)
shape
- the shape of the tensorinputVertex
- the input vertexpublic DoubleTensor sample(KeanuRandom random)
sample
in class Vertex<DoubleTensor>
random
- source of randomnesspublic DoubleTensor calculate()
calculate
in interface NonProbabilistic<DoubleTensor>
public DualNumber calculateDualNumber(java.util.Map<Vertex,DualNumber> dualNumbers)
calculateDualNumber
in interface Differentiable
calculateDualNumber
in class DoubleVertex
protected abstract DoubleTensor op(DoubleTensor value)
protected abstract DualNumber dualOp(DualNumber dualNumber)