LoginSignup
0
0

More than 3 years have passed since last update.

kerasをインポートしようとしたらFutureWarning:numpyダウングレードで解決

Posted at

環境

  • OS:macOS Catalina
  • python: 3.7.4
  • tensorflow: 1.14.0
  • keras: 2.2.4
  • numpy: 1.17.2

状況

機械学習関連の書籍のサンプルを動かしている際の出来事です。
jupyter notebookでkerasをインポートしようとした矢先、以下のエラーが表示されました。
import keras
Using TensorFlow backend.
〜略〜
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.2がtensorflow 1.14.0に対応していないのが原因と思われる。
numpy 1.16.4にダウングレードを行った。
conda install numpy==1.16.4
jupyter notebookを立ち上げもう一度kerasをインポート すると無事以下の表示がされた。
Using TensorFlow backend.

参考

[備忘録] tensorflow-rocmでimport時にnumpyのFutureWaringが出た話

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