Package com.yahoo.tensor.functions
Class CompositeTensorFunction<NAMETYPE extends Name>
java.lang.Object
com.yahoo.tensor.functions.TensorFunction<NAMETYPE>
com.yahoo.tensor.functions.CompositeTensorFunction<NAMETYPE>
- Direct Known Subclasses:
Argmax,Argmin,Diag,Expand,L1Normalize,L2Normalize,Matmul,Random,Range,ReduceJoin,Softmax,XwPlusB
public abstract class CompositeTensorFunction<NAMETYPE extends Name>
extends TensorFunction<NAMETYPE>
A composite tensor function is a tensor function which can be expressed (less tersely)
as a tree of primitive tensor functions.
- Author:
- bratseth
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(EvaluationContext<NAMETYPE> context) Evaluates this by first converting it to a primitive functiontype(TypeContext<NAMETYPE> context) Finds the type this produces by first converting it to a primitive functionMethods inherited from class com.yahoo.tensor.functions.TensorFunction
arguments, asScalarFunction, evaluate, hashCode, toPrimitive, toString, toString, withArguments, withTransformedFunctions
-
Constructor Details
-
CompositeTensorFunction
public CompositeTensorFunction()
-
-
Method Details
-
type
Finds the type this produces by first converting it to a primitive function- Specified by:
typein classTensorFunction<NAMETYPE extends Name>- Parameters:
context- a context which must be passed to all nexted functions when evaluating
-
evaluate
Evaluates this by first converting it to a primitive function- Specified by:
evaluatein classTensorFunction<NAMETYPE extends Name>- Parameters:
context- a context which must be passed to all nested functions when evaluating
-