Tensor - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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

Description

• 

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.

Properties of Tensors

• 

The following commands query properties of a Tensor.

Datatype

Name

Rank

Shape

Element-wise Operations on Tensors

• 

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

Matrix Operations with Tensors

• 

The following functions operate on Tensors as matrices.

CrossProduct

Determinant

Diagonal

DotProduct

MatrixInverse

MatrixMultiply

Norm

SingularValueDecomposition

SVD

Trace

Transpose

 

Other Operations on Tensors

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

 

 

Examples

Create a one-dimensional Variable Tensor

withDeepLearning:

VVariable1.5,7.2,2.3,datatype=float8

VDeepLearning VariableName: Variable:0Shape: [3]Data Type: float[8]

(1)

ShapeV

3

(2)

Create a Constant two-dimensional Tensor

CConstant0.4,0.7|0.7,0.3

CDeepLearning TensorShape: [2, 2]Data Type: float[8]

(3)

ShapeC

2,2

(4)

Compatibility

• 

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