TensorFlow 1.0.0 リリースノート(翻訳)
翻訳 : (株)クラスキャット セールスインフォメーション
日時 : 02/16/2017
* 本ページは、github TensorFlow の releases の TensorFlow 1.0.0 を翻訳したものです:
https://github.com/tensorflow/tensorflow/blob/r1.0/RELEASE.md
主要な特徴と改良
- XLA (実験的) : XLA の初期リリース、TensorFlow グラフのためのドメイン固有コンパイラ、CPU と GPU を対象とします。
- TensorFlow デバッガー (tfdbg): コマンドライン I/F と API。
- 新しい python 3 docker イメージが追加されました。
- pip パッケージを pypi 準拠にしました。TensorFlow は今 pip install tensorflow コマンドでインストール可能になりました。
- 幾つかの python API コールは NumPy により近く似せるために変更されました。
- Android: 深層ニューラルネットワークを使用したスケーラブル物体検出 (Scalable Object Detection) を実装した、人間検出 + 追跡 (person detection + tracking) デモ。
- 新しい(実験的な) Java API。
- “A Learned Representation For Artistic Style” ベースの新しい Android 画像 stylization デモを追加。そして YOLO 物体検出をサポート。
API への重大な変更 (breakinig changes)
下記の API 変更にマッチさせるために既存の TensorFlow Python コードをアップグレードすることを補助するために、変換スクリプト を用意しています。
- TensorFlow/models は分離した github レポジトリに移されました。
- 除算と剰余演算子 (/, //, %) は今 Python (床関数の – flooring) セマンティクスにマッチしています。これは tf.div と tf.mod にも適用されます。強制的な整数切り捨て (integer truncation) ベースの振る舞いを得るためにはtf.truncatediv と tf.truncatemod が使用できます。
- tf.divide() は今や推奨の除算関数です。tf.div() は存続するでしょうが、そのセマンティクスは Python 3 に、あるいは将来的な機構に呼応していません。
- tf.reverse() は今 reverse される軸のインデックスを取ります。E.g. tf.reverse(a, [True, False, True]) は今 tf.reverse(a, [0, 2]) として書かれます。tf.reverse_v2() は 1.0 最終版まで存続します。
- tf.mul, tf.sub そして tf.neg は tf.multiply, tf.subtract そして tf.negative のために非推奨です。
- tf.pack と tf.unpack は tf.stack と tf.unstack のために非推奨です。
- TensorArray.pack と TensorArray.unpack は TensorArray.stack と TensorArray.unstack のために非推奨になります。
- 次の Python 関数は、特定の次元を参照する時に軸を使用するように引数が変更されました。古いキーワード引数も互換性のために現在は保持していますが、最終の 1.0 の前にはそれら取り除かれます。
- tf.argmax: dimension becomes axis
- tf.argmin: dimension becomes axis
- tf.count_nonzero: reduction_indices becomes axis
- tf.expand_dims: dim becomes axis
- tf.reduce_all: reduction_indices becomes axis
- tf.reduce_any: reduction_indices becomes axis
- tf.reduce_join: reduction_indices becomes axis
- tf.reduce_logsumexp: reduction_indices becomes axis
- tf.reduce_max: reduction_indices becomes axis
- tf.reduce_mean: reduction_indices becomes axis
- tf.reduce_min: reduction_indices becomes axis
- tf.reduce_prod: reduction_indices becomes axis
- tf.reduce_sum: reduction_indices becomes axis
- tf.reverse_sequence: batch_dim becomes batch_axis, seq_dim becomes seq_axis
- tf.sparse_concat: concat_dim becomes axis
- tf.sparse_reduce_sum: reduction_axes becomes axis
- tf.sparse_reduce_sum_sparse: reduction_axes becomes axis
- tf.sparse_split: split_dim becomes axis
- NumPy 命名に合わせるために tf.listdiff は tf.setdiff1d に名称変更されました。
- 行列反転 (matrix inversion) の np.inv との混乱を避けるために tf.inv は tf.reciprocal (component-wise reciprocal) と名称変更されました。
- NumPy に合わせるために tf.round は銀行丸め (banker’s rounding, round to even) セマンティクスを使用します。
- tf.split は逆順で異なるキーワードで引数を取ります。特に tf.split(value, num_or_size_splits, axis) として NumPy 順序に合います。
- tf.sparse_split は逆順で異なるキーワードで引数を取ります。特に tf.sparse_split(sp_input, num_split, axis) として NumPy 順序に合います。NOTE: 一時的に tf.sparse_split をキーワード引数を必要とさせています。
- tf.concat は逆順で異なるキーワードで引数を取ります。特に tf.concat(values, axis, name)として NumPy 順序に合います。
- デフォルトでは tf.image.decode_jpeg は faster DCT 法を使用します、改善されたスピードのために忠実度を少し犠牲にします。属性 dct_method=’INTEGER_ACCURATE’ を指定することで古い振る舞いに戻すことができます。
- tf.complex_abs は Python インターフェイスから削除されました。tf.abs が複素テンソル (complex tensors) をサポートして代わり使用すべきです。
- Template.var_scope プロパティは .variable_scope に名称変更されました。
- SyncReplicasOptimizer は削除されて SyncReplicasOptimizerV2 は SyncReplicasOptimizer に名称変更されました。
- tf.zeros_initializer() と tf.ones_initializer() は今 initializer 引数とともに呼び出されなければならない callable を返します、貴方のコードにおいては tf.zeros_initializer を tf.zeros_initializer() で置き換えてください。
- SparseTensor.shape は SparseTensor.dense_shape に名称変更されました。SparseTensorValue.shape についても同じです。
- tf.scalar_summary, tf.histogram_summary, tf.audio_summary, tf.image_summary を tf.summary.scalar, tf.summary.histogram, tf.summary.audio, tf.summary.image にそれぞれ置き換えます。新しい summary ops は最初の引数として tag よりも name を取ります、これは summary ops は今 TensorFlow 名前空間を respect することを意味します。
- tf.train.SummaryWriter と tf.train.SummaryWriterCache を tf.summary.FileWriter と tf.summary.FileWriterCache で置き換えました。
- RegisterShape を公開 API から削除しました。C++ shape 関数登録を代わりに使用します。
- python API から_ref dtypes は非推奨になりました。
- C++ API (in tensorflow/cc) において、Input, Output, etc. は tensorflow::ops 名前空間から tensorflow に移されました。
- {softmax,sparse_softmax,sigmoid}_cross_entropy_with_logits のための引数順序を
(labels, predictions) に変更し、named args の使用を強制します。
バグ修正と他の変更
- 多数の C++ API アップデート。
- 新しい op: parallel_stack.
- RecordReader/RecordWriter のために io compression オプション定数を導入します。
- string features を IDs に変換する feature column を指定するために、sparse_column_with_vocabulary_file を追加します。そこではマッピングは語彙ファイルで定義されます。
- インデックスを文字列にマップする lookup table を返す、index_to_string_table の追加。
- 文字列をインデックスにマッチさせる lookup table を返す、string_to_index_table を追加。
- ParallelForWithWorkerId 関数の追加。
- 文字列をインデックスにマッチさせる lookup table を返す、string_to_index_table を追加。(原文まま、重複)
- contrib/session_bundle において v2 の checkpoint ファイルから session の復旧のサポート。
- 任意の角度のための tf.contrib.image.rotate 関数を追加しました。
- tf.contrib.framework.filter_variables を正規表現ベースの変数リストをフィルターするために convenience 関数として追加しました。
- make_template() はオプションで custom_getter_ param を取ります。
- 既存のディレクトリが recursive_create_dir でどのように処理されるかについてコメントを追加。
- QR factorizations のための op を追加。
- Python API の除算と剰余は今や flooring (Python) セマンティクスを使用します。
- Android: pre-built libs が今や nightly で build されます。
- Android: contrib/android/cmake 下の TensorFlow 推論ライブラリのための cmake/gradle build。
- Android: 非常により堅牢な Session 初期化コード
- Android: デバッグ・モードが active である時、TF stats は今やデモとログで直接的に晒されます。
- Android: 新しい/より良い README.md ドキュメンテーション。
- saved_model は tf.saved_model として利用可能です。
- Empty op は今ステートフルです。
- ASSIGN 操作のための cpu 上の scatter_update のスピードを改善しました。
- reduce_join を、他の reduce_ ops と同じやり方で reduction_indices を扱うように変更しました。
- TensorForestEstimator は contrib/tensor_forest に移しました。
- コンパイラ最適化をデフォルトで有効にしてconfigure における configuration を可能にします。
- tf.divide は今は名前フィールドを尊重します。
- metrics weight broadcasting をより厳密にします。
- 新しい queue-ライクな StagingArea と新しい op: stage and unstage を追加しました。
- CPU 上の文字列に対して inplace update ops を有効にしました。文字列結合をスピードアップします。
以上