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

Tensorflow API: tf.truncated_normal

More than 1 year has 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 do not you register as a user and use Qiita more conveniently?
  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
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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