本人使用python运行一神经网络模型时出现bug如下

tensorflow.contrib.labeled_tensor.python.ops._typecheck.Error:
[{‘TRAIN_TUPLE’: FixedLenFeature(shape=[], dtype=tf.string, default_value=None)}, {‘TRAIN_TUPLE’: FixedLenFeature(shape=[], dtype=tf.string, default_value=None)}, {‘TRAIN_TUPLE’: FixedLenFeature(shape=[], dtype=tf.string, default_value=None)}, {‘TRAIN_TUPLE’: FixedLenFeature(shape=[], dtype=tf.string, default_value=None)}]
of type <class ‘list’> is not an instance of the allowed type Collection (Union(labeled_tensor.LabeledTensor, tensorflow.Tensor,numpy.ndarray,Union(numbers.Number, bool, bytes, str)))
for <function pack at 0x00000222C756A598>

讨论数量: 2

求解救方法

2年前 评论
Jason990420

看了连续的两个问题的内容, 实在是不知从何下手, 主要是想回答问题的人, 无法重现问题, 进而找到原因, 因而无法回答问题.

建议, 提问题时, 应该提供下列资讯, 比如

  • 系统平台 WIN10
  • Python 3.95
  • Tensorflow 2.7.0
  • 简短的可执行代码
  • 完整的错误讯息
  • 相关文件
  • 问题目标

注: 除非是屏幕或图片, 尽可能不使用截图, 尤其是代码.

2年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!