Help us understand the problem. What is going on with this article?

Tensorflow API: tf.truncated_normal

More than 3 years have passed since last update.

https://www.tensorflow.org/api_docs/python/tf/truncated_normal

概要

±2σの切断正規分布からランダムに取り出したテンソルを生成する。

truncated_normal(
    shape,
    mean=0.0,
    stddev=1.0,
    dtype=tf.float32,
    seed=None,
    name=None
)
  • shape: 戻り値のテンソルの次元 (1次元のintegerリストもしくはテンソルを指定)
  • mean: 生成する切断正規分布の平均値
  • stddev: 生成する切断正規分布の標準偏差
  • dtype: 戻り値のテンソルの型
  • seed: integerを指定すると、sessionが変わっても都度同じ値を抽出するようになる
  • name: operationの名前

使用例

ipython
import tensorflow as tf

x = tf.truncated_normal(shape=[2, 2], mean=0.0, stddev=1.0, dtype=tf.float32)
with tf.Session() as sess:
    x.eval()
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away