【发布时间】:2021-07-27 14:59:37
【问题描述】:
我正在使用 Pycharm、tensorflow 2.4 和 python v3.8.5 构建示例神经网络。运行此命令时:
X = tf.placeholder("float", [None, num_input]) #num_input is the sized of input vector
我收到类似这样的错误:
raise TypeError("Error converting %s to a TensorShape: %s." % (arg_name, e))
TypeError: Error converting shape to a TensorShape: Dimension value must be integer or None or have an __index__ method, got value '8.0' with type '<class 'numpy.float64'>'.
那个错误的问题是什么?提前致谢
【问题讨论】:
标签: python tensorflow neural-network pycharm