gpt4 book ai didi

python - 属性错误 : module 'keras.backend' has no attribute 'common'

转载 作者:行者123 更新时间:2023-12-04 14:11:15 26 4
gpt4 key购买 nike

我试图执行一些项目。但我有一个 attribute error .
我检查了我的 Tensorflow 和 Keras 版本。

Name: tensorflow
Version: 2.3.1
Name: Keras
Version: 2.4.3
Summary: Deep Learning for humans
python 3.8.2
代码在这里。
self.dim_ordering = K.common.image_dim_ordering()
错误信息:
self.dim_ordering = K.common.image_dim_ordering()
AttributeError: module 'keras.backend' has no attribute 'common'
可以用 K.image_data_format()而不是 k.common.image_dim_ordering() ?

最佳答案

是的。可以用k.image_data_format()在 Keras v2 中,该方法已重命名为 image_data_format

关于python - 属性错误 : module 'keras.backend' has no attribute 'common' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64118331/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com