8
7

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 3 years have passed since last update.

tensorflow-rocmでimport時にnumpyのFutureWaringが出た話

Last updated at Posted at 2019-08-26

環境

OS:ubuntu 19.04
Python version:3.7.3
tensorflow version:1.14.1
numpy version:1.17.0

状況

tensorflowをimportすると以下のようなメッセージがたくさん表示される。

/home/[username]/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.

対処

numpy 1.17.0がtensorflow 1.14.1に対応していないのが原因。
numpy 1.16.4に落としてあげればいい。

pip3 install numpy==1.16.4

参考

TenserFlow 1.4.0 をWindows10にインストールしたときのトラブル対応方法

#2019/12/24 追記
ちょっと前にpipで入るtensorflow-rocmのバージョンが2系になったので、最新のtensorflow-rocmを使えば最新のnumpyでも動くみたい。

8
7
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
8
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?