在 tensorflow 2.4 中替换了哪个命令 tf.placeholder?

问题描述

我正在使用 tensorflow 2.4.1 和来自 tensorflow 1代码。每当我运行以下命令时,都会出现错误

inputs = tf.placeholder(tf.int32,[None,None],name = 'input')

错误

AttributeError                            Traceback (most recent call last)
<ipython-input-14-c2404ca8696c> in <module>()
----> 1 inputs = tf.placeholder(tf.int32,name = 'input')

AttributeError: module 'tensorflow' has no attribute 'placeholder'

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)