Variables - Maple Help

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: undefined}}\\ {\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: undefined}}\\ {\mathrm{Data Type: float\left[8\right]}}\end{array}\right]$ (2)

Compatibility

 • The DeepLearning[Variables] command was introduced in Maple 2018.