![Mastering TensorFlow 1.x](https://wfqqreader-1252317822.image.myqcloud.com/cover/313/36700313/b_36700313.jpg)
上QQ阅读APP看书,第一时间看更新
Populating tensor elements with a random distribution
TensorFlow provides us with the functions to generate tensors filled with random valued distributions.
The distributions generated are affected by the graph-level or the operation-level seed. The graph-level seed is set using tf.set_random_seed, while the operation-level seed is given as the argument seed in all of the random distribution functions. If no seed is specified, then a random seed is used.
More details on random seeds in TensorFlow can be found at the following link: https://www.tensorflow.org/api_docs/python/tf/set_random_seed.
The following table lists some of the tensor generating functions to populate elements of the tensor with random valued distributions:
![](https://epubservercos.yuewen.com/A78D65/19470398901593706/epubprivate/OEBPS/Images/006.jpg?sign=1739421585-mYibsYpXxtnZbW2ltHiaHID4trcWHOtH-0-60094625e8264bbe9c004e053fe56f51)