Keras AttributeError: 'list' object has no attribute 'ndim'

后端 未结 3 1306
名媛妹妹
名媛妹妹 2021-02-12 14:50

I\'m running a Keras neural network model in Jupyter Notebook (Python 3.6)

I get the following error

AttributeError: \'list\' object has no attrib

3条回答
  •  难免孤独
    2021-02-12 15:16

    When you import you should use tensorflow.keras instead of just keras like this:

    from tensorflow.keras.models import Sequential
    from tensorflow.keras.layers import Input, Conv2D, MaxPool2D, Dense
    

    because there is a bug related to the keras module.

    Reference: here.

提交回复
热议问题