设置keras软件包和python以进行机器学习

时间:2019-05-07 11:04:25

标签: python tensorflow machine-learning keras

我正在尝试运行一个使用keras和tensorflow以及图像本地数据集的机器学习模型,但它继续给我带来keras软件包中的错误,这是给我的错误:

>python train_model.py

错误详细信息:

Traceback (most recent call last):
  File "train_model.py", line 9, in <module>
    from keras.preprocessing.image import ImageDataGenerator
  File "C:\Users\Lapierre06\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\__init__.py", line 3, in <module>
    from . import utils
  File "C:\Users\Lapierre06\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\utils\__init__.py", line 2, in <module>
    from . import np_utils
  File "C:\Users\Lapierre06\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\utils\np_utils.py", line 64
    return x / np.expand_dims(l2, axis)
    ^
SyntaxError: 'return' outside function

0 个答案:

没有答案