DeepLearning
VariablesInitializer
initialize variables
Calling Sequence
Description
Details
Examples
Compatibility
VariablesInitializer()
VariablesInitializer() returns an Operation which can be run in a Session to initialize all the variables in the graph.
Note that this command requires that eager execution be turned off beforehand using the SetEagerExecution command.
This function is part of the DeepLearning package, so it can be used in the short form VariablesInitializer(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[VariablesInitializer](..).
The implementation of VariablesInitializer uses the tf.global_variables_initializer command from the TensorFlow Python API. Consult the TensorFlow Python API documentation for tf.global_variables_initializer for more information on random number generation during TensorFlow computations.
with⁡DeepLearning:
SetEagerExecution⁡false
true
v≔Variable⁡0.3,datatype=float8
v≔DeepLearning VariableName: Variable:0Shape: [1]Data Type: float[8]
init≔VariablesInitializer⁡
init≔DeepLearning Operationname: "init" op: "NoOp" input: "^Variable/Assign"
sess≔GetDefaultSession⁡
sess≔DeepLearning Session<tensorflow.python.client.session.InteractiveSession object at 0x7fe898c52e10>
sess:-Run⁡init
Python:−None
The DeepLearning[VariablesInitializer] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
The DeepLearning[VariablesInitializer] command was updated in Maple 2021.
The option was updated in Maple 2021.
See Also
DeepLearning Overview
Download Help Document