gpt4 book ai didi

python - 升级到 tensorflow v1.0 后使用 tensorflow.mul() 的代码失败

转载 作者:太空宇宙 更新时间:2023-11-03 12:15:51 25 4
gpt4 key购买 nike

此代码在 Tensorflow v0.12.1 上运行,但在我新安装的 TF v1.0 上运行失败。是这个功能被弃用了吗?我应该使用什么功能? (Tensorflow 启动并运行所以我相信这不是错误配置)

  File "***.py", line 115, in trainNetwork
readout_action = tf.reduce_sum(tf.mul(readout, a), reduction_indices = 1)
AttributeError: module 'tensorflow' has no attribute 'mul'

最佳答案

在 TensorFlow 1.0 中,tf.mul() 函数已重命名为 tf.multiply()

关于python - 升级到 tensorflow v1.0 后使用 tensorflow.mul() 的代码失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42496084/

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