DeepLearning - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : DeepLearning Package : Tensors : Managing Tensors : DeepLearning/GetVariable

DeepLearning

  

GetVariable

  

fetch reference to new or existing Tensor Variable

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

GetVariable(nm,opts)

Parameters

nm

-

string; name of the variable to retrieve

opts

-

zero or more options as specified below

Options

• 

datatype = one of string,truefalse,integer[4],integer[8],float[4],float[8],complex[4], or complex[8]

  

The value of option datatype specifies the type of data this Tensor will hold. By default, the datatype is inferred from the initial data val.

• 

shape = list(nonnegint)

  

Specifies the shape of the variable.

Description

• 

The GetVariable(nm,opts) command retrieves a reference to a Tensor variable in the active dataflow graph with name nm.

• 

This function is part of the DeepLearning package, so it can be used in the short form GetVariable(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[GetVariable](..).

Examples

withDeepLearning:

VVariable2.0,datatype=float8,name=foo

VDeepLearning TensorName: foo:0Shape: [1]Data Type: float[8]

(1)

WGetVariablefoo,shape=1,datatype=float8

WDeepLearning TensorName: foo_1:0Shape: [1]Data Type: float[8]

(2)

Compatibility

• 

The DeepLearning[GetVariable] command was introduced in Maple 2018.

• 

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

See Also

DeepLearning Overview