Deep.Net


IOp

Namespace: SymTensor
Parent Module: Expr

A mathematical operation in an expression. This models a mathematical function or operator that takes one or more tensors and returns one tensor.

Instance members

Instance memberDescription
CanEvalAllSymSizes
Signature: bool
Modifiers: abstract

Should be true, if all symbolic sizes can be evaluated to numeric sizes. This is the case if the function ShapeSpec.canEval or SizeSpec.canEval respectively return true on all sizes used in this op.

CompiledName: get_CanEvalAllSymSizes

CheckArgs(argShapes)
Signature: (argShapes:ShapeSpecT list) -> unit
Modifiers: abstract

Should check if the shapes of the arguments are acceptable and, if not, raise an exception.

ContainedVars
Signature: Set<VarSpecT>
Modifiers: abstract

Should return the set of variables that this op instance depends on.

CompiledName: get_ContainedVars

Deriv(dOp args)
Signature: dOp:ExprT -> (args:ExprT list) -> ExprT list
Modifiers: abstract

Should compute the derivative w.r.t. each argument given the derivative w.r.t. the op. The derivative is always an NxM matrix where N is the number of elements of the function the derivative of which is being taken and M is the number of elements of the argument w.r.t. which the derivative is being taken. Thus, if dOp is an NxK matrix and an argument has M elements, the derivative matrix you return w.r.t. that argument must have NxM elements.

EvalSimple(args)
Signature: (args:Tensor<'T> list) -> Tensor<'T>
Modifiers: abstract
Type parameters: 'T

Should evaluate the numerical value of this op given the numerical values of its arguments. This evaluation should be done on the host using the simplest means possible and is used as a reference implementation for verifying the correctness of optimized (e.g. CUDA) implementations. This method may be omitted when no verification will be done.

Shape(argShapes)
Signature: (argShapes:ShapeSpecT list) -> ShapeSpecT
Modifiers: abstract

Should return the shape of the result, given the shape of the arguments.

SubstSymSizes(symSizes)
Signature: symSizes:SymSizeEnvT -> IOp
Modifiers: abstract

Should return the op with all symbolic sizes substituted using the specified substitution table. Return a new op with substitution applied. Do not apply the mapping in-place.

Fork me on GitHub