8

モジュールをインポートしようとしていますkeras.utils.data_utilsが、うまくいきません。ただし、このモジュールはこちらにあります。それは確かに存在しています。keras.modelsや などの他のモジュールをインポートできるのに、インポートできないのはなぜkeras.layers.coreですか?

cliu@cliu-ubuntu:bin$ python
Python 2.7.9 (default, Apr  2 2015, 15:33:21) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import print_function
>>> from keras.models import Sequential 
>>> from keras.layers.core import Dense, Activation, Dropout 
>>> from keras.layers.recurrent import LSTM
>>> from keras.utils.data_utils import get_file
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named data_utils

編集:

答えはこちらをご覧ください。

4

4 に答える 4

3

https://pypi.python.org/pypi/Keras/0.1.3の tar.gz を見たところ、utils フォルダーに data_utils.py という名前のファイルはありません。ただし、github には次のファイルが含まれています: https://github.com/fchollet/keras

于 2016-03-10T00:47:26.017 に答える
0

これで問題が解決する場合があります。

sudo -H  pip3 install git+https://github.com/fchollet/keras.git --upgrade
于 2017-01-08T05:28:09.130 に答える