11
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tf.cast()とは?<数行で説明編>

Last updated at Posted at 2018-03-13

#1行で説明
型を変換する関数です。

#もう少し詳しく
こういう風に書く。
tf.cast( 変換したいもの , 変換後の型 )

#具体例


import tensorflow as tf

aaa=[False,False,True]

bbb=tf.cast(aaa, tf.float32)

print (sess.run(bbb))

実行結果 


[0. 0. 1.]

 

以上がtf.cast()の説明です。

 

※この記事はテンソルフローを使っている人向けの記事です。

11
9
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
11
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?