LoginSignup
2
2

More than 5 years have passed since last update.

TensorFlowの学習を始めた時によく調べ直すメソッド

Last updated at Posted at 2017-10-18

はじめに

絶賛記事追記中です(17/10/18)

変数・定数など

tf.constant

  • 定数

tf.variable

  • 変数

tf.placeholder

  • データが格納される予定地
  • 出力結果などをここに放り込む

活性化関数

tf.nn.relu

  • 活性化関数
  • 0より大きい時に活性
  • x = (y <= 0.0) ? 0.0 : y;

損失関数

tf.reduce_mean

  • 自分のモデルと実データの差異に対応するコスト
  • 平均を計算する関数
  • 学習結果の正解率を出すのなどに使用

計算

tf.square

  • 二乗をとる

最適化クラス

tf.train.RMSPropOptimizer

  • 収束値に近づいた後、目的関数はほとんど同じ値に留まる。

出力整備

tf.nn.softmax

  • 0~1の結果にする

分類分からず

tf.matmul

  • 行列積
  • matrix multiplicationからきている

truncated_normal

  • 正規分布かつ標準偏差の2倍までのランダムな値で初期化
  • stddev:正規分布の標準偏差を指定する。1.0で標準正規分布

その他調べている時によく見かける旧メソッド

  • tf.audio_summary -> `tf.summary.audio
  • tf.contrib.deprecated.histogram_summary -> tf.summary.histogram
  • tf.contrib.deprecated.scalar_summary -> `tf.summary.scalar
  • tf.histogram_summary -> tf.summary.histogram
  • tf.image_summary -> tf.summary.image
  • tf.merge_all_summaries -> tf.summary.merge_all
  • tf.merge_summary -> tf.summary.merge
  • tf.scalar_summary -> tf.summary.scalar
  • tf.train.SummaryWriter -> tf.summary.FileWriter

TensorFlow の "AttributeError: 'module' object has no attribute 'xxxx'" エラーでつまづいてしまう人のための移行ガイド

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2