From d65019bc67dff1887c6634b904cf31faaea795c0 Mon Sep 17 00:00:00 2001 From: sun1638650145 <1638650145@qq.com> Date: Wed, 1 Dec 2021 17:50:00 +0800 Subject: [PATCH] 20211201 --- TensorFlow.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/TensorFlow.md b/TensorFlow.md index 33521f1..fa7c35b 100644 --- a/TensorFlow.md +++ b/TensorFlow.md @@ -2487,7 +2487,17 @@ import tensorflow as tf tensor = tf.random.normal(shape=[2, 3]) # array-like|张量的形状. ``` -### 1.23.2.uniform() +### 1.23.2.set_seed() + +设置全局随机种子. + +```python +import tensorflow as tf + +tf.random.set_seed(seed=2021) # int|随机种子. +``` + +### 1.23.3.uniform() 生成均匀分布的张量.|`tensorflow.python.framework.ops.EagerTensor`