public class LambdaModelVertex extends DoubleVertex implements ModelVertex<DoubleTensor>, NonSaveableVertex
| Constructor and Description |
|---|
LambdaModelVertex(java.util.Map<VertexLabel,Vertex<? extends Tensor>> inputs,
java.util.function.Consumer<java.util.Map<VertexLabel,Vertex<? extends Tensor>>> executor,
java.util.function.Supplier<java.util.Map<VertexLabel,Vertex<? extends Tensor>>> updateValues)
A vertex whose operation is the execution of a lambda.
|
| Modifier and Type | Method and Description |
|---|---|
DoubleTensor |
calculate()
This vertex stores multiple values in a key value pair of label to result.
|
static LambdaModelVertex |
createFromProcess(java.util.Map<VertexLabel,Vertex<? extends Tensor>> inputs,
java.lang.String command,
java.util.function.Supplier<java.util.Map<VertexLabel,Vertex<? extends Tensor>>> updateValues)
A vertex whose operation is the execution of a command line process.
|
<U,T extends Tensor<U,T>> |
getModelOutputValue(VertexLabel label) |
boolean |
hasCalculated() |
boolean |
hasValue() |
void |
run() |
java.util.Map<VertexLabel,Vertex<? extends Tensor>> |
updateValues() |
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, unaryMinusaddChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getDegree, getId, getIndentation, getLabel, getObservedValue, getParents, getRank, getReference, getShape, getState, getValue, hashCode, isDifferentiable, isObserved, isProbabilistic, lazyEval, observe, observeOwnValue, print, print, removeLabel, save, setAndCascade, setLabel, setLabel, setParents, setParents, setState, setValue, toString, unobserveclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBooleanModelOutputVertex, getDoubleModelOutputVertex, getIntegerModelOutputVertexcontradictsObservationgetObservedValue, isObserved, observe, unobservepublic LambdaModelVertex(java.util.Map<VertexLabel,Vertex<? extends Tensor>> inputs, java.util.function.Consumer<java.util.Map<VertexLabel,Vertex<? extends Tensor>>> executor, java.util.function.Supplier<java.util.Map<VertexLabel,Vertex<? extends Tensor>>> updateValues)
inputs - input vertices to the modelexecutor - the operation to performupdateValues - a function to extract the output values (once the operation has been performed) and update
the models output values.public static LambdaModelVertex createFromProcess(java.util.Map<VertexLabel,Vertex<? extends Tensor>> inputs, java.lang.String command, java.util.function.Supplier<java.util.Map<VertexLabel,Vertex<? extends Tensor>>> updateValues)
inputs - input vertices to the modelcommand - the command to executeupdateValues - a function to extract the output values (once the operation has been performed) and update
the models output values.public DoubleTensor calculate()
calculate in interface NonProbabilistic<DoubleTensor>public boolean hasValue()
hasValue in class Vertex<DoubleTensor>public void run()
run in interface ModelVertex<DoubleTensor>public java.util.Map<VertexLabel,Vertex<? extends Tensor>> updateValues()
updateValues in interface ModelVertex<DoubleTensor>public boolean hasCalculated()
hasCalculated in interface ModelVertex<DoubleTensor>public <U,T extends Tensor<U,T>> T getModelOutputValue(VertexLabel label)
getModelOutputValue in interface ModelVertex<DoubleTensor>