public class SumVertex extends DoubleUnaryOpVertex implements Differentiable
INPUT_VERTEX_NAME, inputVertex
Constructor and Description |
---|
SumVertex(DoubleVertex inputVertex)
Performs a sum across all dimensions
|
SumVertex(DoubleVertex inputVertex,
int[] overDimensions)
Performs a sum across specified dimensions.
|
Modifier and Type | Method and Description |
---|---|
PartialDerivative |
forwardModeAutoDifferentiation(java.util.Map<Vertex,PartialDerivative> derivativeOfParentsWithRespectToInput) |
int[] |
getOverDimensions() |
protected DoubleTensor |
op(DoubleTensor value) |
java.util.Map<Vertex,PartialDerivative> |
reverseModeAutoDifferentiation(PartialDerivative derivativeOfOutputWithRespectToSelf) |
calculate, getInputVertex
abs, acos, asin, atan, atan2, ceil, concat, cos, div, div, divideBy, divideBy, equalTo, exp, floor, getValue, greaterThan, greaterThanOrEqualTo, lambda, lambda, lessThan, lessThanOrEqualTo, loadValue, log, logGamma, matrixDeterminant, matrixInverse, matrixMultiply, max, min, minus, minus, multiply, multiply, notEqualTo, observe, observe, permute, plus, plus, pow, pow, reshape, reverseDiv, reverseMinus, round, saveValue, setAndCascade, setAndCascade, setValue, setValue, setWithMask, setWithMask, sigmoid, sin, slice, sum, sum, take, tan, times, times, toGreaterThanMask, toGreaterThanMask, toGreaterThanOrEqualToMask, toGreaterThanOrEqualToMask, toInteger, toLessThanMask, toLessThanMask, toLessThanOrEqualToMask, toLessThanOrEqualToMask, transpose, unaryMinus
addChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getDegree, getId, getIndentation, getLabel, getObservedValue, getParents, getRank, getReference, getShape, getState, getValue, hashCode, hasValue, isDifferentiable, isObserved, isProbabilistic, lazyEval, observe, observeOwnValue, print, print, removeLabel, save, setAndCascade, setLabel, setLabel, setParents, setParents, setState, setValue, toString, unobserve
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
withRespectToSelf
contradictsObservation
getObservedValue, isObserved, observe, unobserve
public SumVertex(DoubleVertex inputVertex, int[] overDimensions)
inputVertex
- the vertex to have its values summedoverDimensions
- dimensions to sum overpublic SumVertex(DoubleVertex inputVertex)
inputVertex
- the vertex to have its values summedprotected DoubleTensor op(DoubleTensor value)
op
in class DoubleUnaryOpVertex
public PartialDerivative forwardModeAutoDifferentiation(java.util.Map<Vertex,PartialDerivative> derivativeOfParentsWithRespectToInput)
forwardModeAutoDifferentiation
in interface Differentiable
public java.util.Map<Vertex,PartialDerivative> reverseModeAutoDifferentiation(PartialDerivative derivativeOfOutputWithRespectToSelf)
reverseModeAutoDifferentiation
in interface Differentiable
public int[] getOverDimensions()