2017-01-11 2 views
2

スリムライブラリにdtype=tf.halfを定義する方法はありますか?一般に、私はfp16と訓練したい、つまりすべてのテンソルを半精度にしたいとしましょう。これをtf.slimに指定する方法はありますか? tensorflow使用中の半精度についてテンソルフロースリムと半精度

答えて

0

tf.float16
例:

 
import tensorflow as tf 
import tensorflow.contrib.slim as slim 
weights = slim.variable('weights', shape=[10, 1], dtype=tf.float16)