 SetRandomSeed - Maple Help

DeepLearning

 SetRandomSeed
 create a random Tensor Calling Sequence SetRandomSeed(seed) Parameters

 seed - integer Description

 • The SetRandomSeed(seed) command sets a seed for the random number generator used by the dataflow graph in DeepLearning computations.
 • This function is part of the DeepLearning package, so it can be used in the short form SetRandomSeed(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[SetRandomSeed](..). Details

 • The implementation of SetRandomSeed uses the tf.set_random_seed command from the TensorFlow Python API. Consult the TensorFlow Python API documentation for tf.set_random_seed for more information on random number generation during TensorFlow computations. Examples

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $\mathrm{SetRandomSeed}\left(2001247\right)$
 ${\mathrm{Python}}{:-}{\mathrm{None}}$ (1)
 > $\mathrm{t1}≔\mathrm{RandomTensor}\left(\mathrm{Gamma}\left(4.3,3.4\right),\left[100\right]\right)$
 ${\mathrm{t1}}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Tensor}}\\ {\mathrm{Shape: \left[100\right]}}\\ {\mathrm{Data Type: float\left[4\right]}}\end{array}\right]$ (2) Compatibility

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