AttributeError: ‘Sequential’ object has no attribute '_get_distribution_strategy’
在调试3D CNN代码过程中遇到以下报错:
解决方法
参考
报错原因是keras和tf.keras混用导致报错
所以将代码中的
from keras.xx
#改为
from tensorflow.keras.xx
如下图:
此后顺利运行。
更多推荐
AttributeError: ‘Sequential‘ object has no attribute ‘_get_distribution_strategy
发布评论