解决AttributeError: module tensorflow_core.keras has no attribute Dense
·
使用工具是jupyter notebook,按照视频中代码照敲竟然是错的,无语,使用tab键一步步打开方法选择问题才解决,终于找到Dense方法所在地,附上原代码和改正后代码:
model.add(tf.keras.Dense(10,activation = 'softmax'))
改正后:
model.add(tf.keras.layers.Dense(10,activation = 'softmax'))
更多推荐
已为社区贡献6条内容
所有评论(0)