public abstract class DoubleUnaryOpVertex extends NonProbabilisticDouble
Modifier and Type | Field and Description |
---|---|
protected DoubleVertex |
inputVertex |
ID_GENERATOR
Constructor and Description |
---|
DoubleUnaryOpVertex(int[] shape,
DoubleVertex inputVertex)
A vertex that performs a user defined operation on a singe input vertex
|
Modifier and Type | Method and Description |
---|---|
DoubleTensor |
getDerivedValue() |
protected abstract DoubleTensor |
op(DoubleTensor a) |
DoubleTensor |
sample(KeanuRandom random) |
dLogPdf, isProbabilistic, logPdf, observe, updateValue
abs, acos, asin, atan, atan2, calculateDualNumber, ceil, cos, div, div, divideBy, divideBy, dLogPdf, dLogPdf, exp, floor, getDualNumber, getValue, lambda, log, logPdf, logPdf, matrixMultiply, minus, minus, multiply, multiply, observe, observe, pluck, plus, plus, pow, pow, round, setAndCascade, setAndCascade, setValue, setValue, sigmoid, sin, slice, sum, tan, times, times, unaryMinus
dLogProb, logProb
addChild, addParent, addParents, dLogProbAtValue, equals, eval, getChildren, getConnectedGraph, getId, getParents, getRawValue, getShape, getValue, hashCode, hasValue, isObserved, lazyEval, logProbAtValue, observeOwnValue, sample, setAndCascade, setParents, setParents, setValue, unobserve
protected final DoubleVertex inputVertex
public DoubleUnaryOpVertex(int[] shape, DoubleVertex inputVertex)
shape
- the shape of the resulting vertexinputVertex
- a vertexpublic DoubleTensor sample(KeanuRandom random)
sample
in class Vertex<DoubleTensor>
random
- source of randomnesspublic DoubleTensor getDerivedValue()
getDerivedValue
in class NonProbabilisticDouble
protected abstract DoubleTensor op(DoubleTensor a)