public class ReduceVertex extends DoubleVertex implements Differentiable, NonProbabilistic<DoubleTensor>, NonSaveableVertex
Constructor and Description |
---|
ReduceVertex(java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction,
java.util.function.Supplier<PartialDerivative> forwardModeAutoDiffLambda,
java.util.function.Function<PartialDerivative,java.util.Map<Vertex,PartialDerivative>> reverseModeAutoDiffLambda,
Vertex<DoubleTensor>... input)
Reduce vertex that assumes shape as inputs
|
ReduceVertex(java.util.List<? extends Vertex<DoubleTensor>> inputs,
java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction)
Reduce vertex that assumes shape as inputs
|
ReduceVertex(long[] shape,
java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction,
java.util.function.Supplier<PartialDerivative> forwardModeAutoDiffLambda,
java.util.function.Function<PartialDerivative,java.util.Map<Vertex,PartialDerivative>> reverseModeAutoDiffLambda,
Vertex<DoubleTensor>... input) |
ReduceVertex(long[] shape,
java.util.Collection<? extends Vertex<DoubleTensor>> inputs,
java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction) |
ReduceVertex(long[] shape,
java.util.Collection<? extends Vertex<DoubleTensor>> inputs,
java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction,
java.util.function.Supplier<PartialDerivative> forwardModeAutoDiffLambda,
java.util.function.Function<PartialDerivative,java.util.Map<Vertex,PartialDerivative>> reverseModeAutoDiffLambda) |
Modifier and Type | Method and Description |
---|---|
DoubleTensor |
calculate() |
PartialDerivative |
forwardModeAutoDifferentiation(java.util.Map<Vertex,PartialDerivative> derivativeOfParentsWithRespectToInput) |
java.util.Map<Vertex,PartialDerivative> |
reverseModeAutoDifferentiation(PartialDerivative derivativeOfOutputWithRespectToSelf) |
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 ReduceVertex(long[] shape, java.util.Collection<? extends Vertex<DoubleTensor>> inputs, java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction, java.util.function.Supplier<PartialDerivative> forwardModeAutoDiffLambda, java.util.function.Function<PartialDerivative,java.util.Map<Vertex,PartialDerivative>> reverseModeAutoDiffLambda)
public ReduceVertex(long[] shape, java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction, java.util.function.Supplier<PartialDerivative> forwardModeAutoDiffLambda, java.util.function.Function<PartialDerivative,java.util.Map<Vertex,PartialDerivative>> reverseModeAutoDiffLambda, Vertex<DoubleTensor>... input)
public ReduceVertex(long[] shape, java.util.Collection<? extends Vertex<DoubleTensor>> inputs, java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction)
public ReduceVertex(java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction, java.util.function.Supplier<PartialDerivative> forwardModeAutoDiffLambda, java.util.function.Function<PartialDerivative,java.util.Map<Vertex,PartialDerivative>> reverseModeAutoDiffLambda, Vertex<DoubleTensor>... input)
reduceFunction
- reduce functionforwardModeAutoDiffLambda
- auto diff supplierreverseModeAutoDiffLambda
- function for returning diffinput
- input vertices to reducepublic ReduceVertex(java.util.List<? extends Vertex<DoubleTensor>> inputs, java.util.function.BiFunction<DoubleTensor,DoubleTensor,DoubleTensor> reduceFunction)
reduceFunction
- reduce functioninputs
- input vertices to reducepublic DoubleTensor calculate()
calculate
in interface NonProbabilistic<DoubleTensor>
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