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

Python 升级到tensorflow v1.0后,使用tensorflow.mul()的代码失败,python,tensorflow,Python,Tensorflow,此代码在Tensorflow v0.12.1上运行,但在TF v1.0上的新安装上失败。是否该函数已被弃用?我应该使用什么功能?(Tensorflow启动并运行,因此我相信这不是一个错误配置) TensorFlow 1.0中的tf.mull()函数已重命名为tf.multiply()。有关您的信息,TensorFlow的早期版本中使用了tf.mull、tf.sub和tf.neg。它们已被弃用。 您可以改为使用tf.multiply、tf.subtract和tf.negative。 谢谢 Fi

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


TensorFlow 1.0中的
tf.mull()
函数已重命名为
tf.multiply()

有关您的信息,TensorFlow的早期版本中使用了
tf.mull
tf.sub
tf.neg
。它们已被弃用。
您可以改为使用
tf.multiply
tf.subtract
tf.negative
。 谢谢

  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'