LoginSignup
0
0

More than 5 years have passed since last update.

keras 「ImportError: numpy.core.multiarray failed to import」が出た時の解決策

Last updated at Posted at 2016-06-29

・環境
Mac book air / python2.7

解決策

NumpyをUpdateする。

$ pip install -U numpy

を実行します。

kerasをimportしてみます。

>>> import keras
Using TensorFlow backend.
>>>

おまけ

デフォルトはTheanoですが、
~/.keras/keras.jsonを以下のように書き換えることでTensorFlow
バックエンドにすることが出来ます。

keras.json
{
    "image_dim_ordering": "th", 
    "epsilon": 1e-07, 
    "floatx": "float32", 
    "backend": "tensorflow"
}
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