 DeepLearning - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : DeepLearning Package : Managing Dataflow Graphs : DeepLearning/Variables

DeepLearning

 Variables
 initialize variables

 Calling Sequence Variables()

Description

 • The Variables() command returns a list of all the Tensor variables in the active DataflowGraph.
 • This function is part of the DeepLearning package, so it can be used in the short form Variables(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[Variables](..).

Details

 • The implementation of Variables uses the tf.global_variables_initializer command from the TensorFlow Python API. Consult the TensorFlow Python API documentation for tf.initializers.global_variables for more information on random number generation during TensorFlow computations.

Examples

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $a≔\mathrm{Variable}\left(\left[0.3\right],\mathrm{datatype}=\mathrm{float}\left[8\right],\mathrm{name}="a"\right)$
 ${a}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: a:0}}\\ {\mathrm{Shape: \left[1\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (1)
 > $b≔\mathrm{Variable}\left(\left[0.3\right],\mathrm{datatype}=\mathrm{float}\left[8\right],\mathrm{name}="b"\right)$
 ${b}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: b:0}}\\ {\mathrm{Shape: \left[1\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (2)
 > $\mathrm{Variables}\left(\right)$
 $\left[\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: a:0}}\\ {\mathrm{Shape: \left[1\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]{,}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Name: b:0}}\\ {\mathrm{Shape: \left[1\right]}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]\right]$ (3)

Compatibility

 • The DeepLearning[Variables] command was introduced in Maple 2018.
 • For more information on Maple 2018 changes, see Updates in Maple 2018.

 See Also