kerneltyu’s tech blog

理系学生です.

TensorflowでFutureWarning: Conversion of the second argument ... が出た時

お久しぶりです.

Tensorflowを本格的に始めようとしてTensorflowをインストールをしました. インストールできたはいいものの,FutureWarningが出てしまいました.実行には何の問題もないんですが,出力が非常に見にくい! 調べて見たら,issueに改善方法が書かれていたので,メモ代わりにここに残しておきます.出たFutureWarningが下記です.


/Users/kerneltyu/anaconda3/envs/RL/lib/python3.6/site-packages/h5py/__init__.py:34: 
FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters
    

まぁ,h5pyに問題があるのは一目瞭然で,h5pyのissueを見に行ったら,解決策が載っていました.


pip install h5py==2.8.0rc1
    

こいつでh5pyのバージョン2.8.0rc1をインストールしてあげれば,FutureWarning出なくなりました.