成功解Tensorflow2.0 Bug:module ‘tensorflow.python.keras.api._v2.keras.layers‘ has no attribute ‘Laye

成功解决Tensorflow2.0 Bug:AttributeError: module 'tensorflow.python.keras.api._v2.keras.layers' has no attribute 'LayerNormalization'

1、问题描述在tensorflow-gpu==2.0里运行训练cycleGAN,然后报错。

分析这段源代码,代码上没问题

度娘了半天没有有效消息

2、去stackoverflow找到一个 类似问题,猜测大概是Tensorflow2.0a的版本迭代问题

3、果断卸载tf2.0, 升级最新2.2版本,解决问题

################################我是分割线######################################

猜你喜欢

转载自blog.csdn.net/Irwin2020/article/details/107513635