DeepLearning
Tensor
tensor object for DeepLearning computation
Description
Properties of Tensors
Element-wise Operations on Tensors
Matrix Operations with Tensors
Other Operations on Tensors
Examples
Compatibility
A Tensor is an object representing a multidimensional array of data. It is the core unit of computation in the DeepLearning package.
By performing mathematical or other operations with Tensors, you are implicitly creating additional Tensors and extending the computation graph.
All Tensors have a datatype and a shape. The datatype is always known. The shape may be either fully or partially specified when the Tensor is created.
When eager execution is disabled, a Tensor corresponds to a partially defined computation which, when executed in a Session, produces a concrete instance of multidimensional data. When eager execution is enabled (the default) every Tensor already corresponds to a concrete data instance.
The following commands query properties of a Tensor.
Datatype
Name
Rank
Shape
The following functions operate element-wise on a Tensor.
abs
and
arccos
arccosh
arccot
arccoth
arccsc
arccsch
arcsec
arcsech
arcsin
arcsinh
arctan
arctanh
argument
betainc
ceil
conjugate
cos
cosh
cot
coth
csc
csch
erf
erfc
exp
expm1
floor
imag
implies
lbeta
lgamma
lnGAMMA
log
log1p
log_sigmoid
Maximum
Minimum
not
or
Psi
real
round
rsqrt
sec
sech
sigmoid
sign
sin
sinh
sqrt
tan
tanh
xor
Zeta
The following functions operate on Tensors as matrices.
CrossProduct
Determinant
Diagonal
DotProduct
MatrixInverse
MatrixMultiply
Norm
SingularValueDecomposition
SVD
Trace
Transpose
argmax
argmin
Assign
AssignAdd
AssignSubtract
Cast
IsFinite
IsInfinite
IsNaN
RandomCrop
RandomShuffle
ReduceAll
ReduceAny
ReduceJoin
ReduceLogSumExp
ReduceMax
ReduceMean
ReduceMin
ReduceProduct
ReduceSum
Softmax
SoftmaxCrossEntropyWithLogits
Softplus
Tile
Unstack
value
Create a one-dimensional Variable Tensor
with⁡DeepLearning:
V≔Variable⁡1.5,7.2,2.3,datatype=float8
V≔DeepLearning VariableName: Variable:0Shape: [3]Data Type: float[8]
Shape⁡V
3
Create a Constant two-dimensional Tensor
C≔Constant⁡0.4,0.7|0.7,−0.3
C≔DeepLearning TensorShape: [2, 2]Data Type: float[8]
Shape⁡C
2,2
The DeepLearning[Tensor] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
See Also
DeepLearning Overview
DeepLearning,Constant
DeepLearning,Variable
Download Help Document