DeepLearning/Tensor/Assign - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : DeepLearning Package : Tensors : Operations on Tensors : DeepLearning/Tensor/Assign

DeepLearning/Tensor/Assign

assign a value to a Tensor

DeepLearning/Tensor/AssignAdd

increment the value of a Tensor

DeepLearning/Tensor/AssignSubtract

decrement the value of a Tensor

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Assign(t,v)

AssignAdd(t,v)

AssignSubtract(t,v)

Parameters

t

-

Tensor

v

-

Tensor

Description

• 

The Assign(t,v) command assigns the Tensor value v to the mutable Tensor t.

• 

The AssignAdd(t,v) and AssignSub(t,v) commands behave similarly but instead of simply replacing the previous value of t, they increment and decrement, respectively, the existing value of t by v.

• 

If t is not a mutable Tensor, an error will be thrown.

Examples

withDeepLearning:

cConstant1.,2.|3.,4.

cDeepLearning TensorName: Const:0Shape: [2, 2]Data Type: float[8]

(1)

tVariable0.,0.|0.,0.

tDeepLearning TensorName: Variable:0Shape: [2, 2]Data Type: float[8]

(2)

valueVariablesInitializer

Python:−None

(3)

Assignt,c

DeepLearning TensorName: Assign:0Shape: [2, 2]Data Type: float[8]

(4)

valuet

0.0.0.0.

(5)

Compatibility

• 

The DeepLearning/Tensor/Assign, DeepLearning/Tensor/AssignAdd and DeepLearning/Tensor/AssignSubtract commands were introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

DeepLearning Overview

Tensor