在运行WaterGAN代码时出现:
AttributeError: module 'tensorflow' has no attribute 'pack'
将
eta = tf.pack([eta_r,eta_g,eta_b],axis=3)
改为:
eta = tf.stack([eta_r,eta_g,eta_b],axis=3)
即把将所有pack->stack
在运行WaterGAN代码时遇到AttributeError:module 'tensorflow' has no attribute 'pack'的错误。解决方法是将tf.pack替换为tf.stack,即将所有pack->stack。此更改适用于从TensorFlow 1.x到2.x的迁移。
在运行WaterGAN代码时出现:
AttributeError: module 'tensorflow' has no attribute 'pack'
将
eta = tf.pack([eta_r,eta_g,eta_b],axis=3)
改为:
eta = tf.stack([eta_r,eta_g,eta_b],axis=3)
即把将所有pack->stack
您可能感兴趣的与本文相关的镜像
TensorFlow-v2.15
TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型
1767

被折叠的 条评论
为什么被折叠?