sinat_18131557 2019-02-24 18:53 采纳率: 100%
浏览 1126
已采纳

Tensorflow object detection API 使用VOC数据集出现错误。

环境:Win7+Anaconda+Python3.6+tensorflow 1.12.0

在进行目标检测时,运行train.py,跳转到array____ops.py在903行出错,

            if ops.is_dense_tensor_like(elem):
                if dtype is not None and elem.dtype.base_dtype != dtype:
                    raise TypeError("Cannot convert a list containing a tensor of dtype "
                                    "%s to %s (Tensor is: %r)" % (elem.dtype, dtype, elem))
                converted_elems.append(elem)
                must_pack = True
            elif isinstance(elem, (list, tuple)):
                converted_elem = _autopacking_helper(elem, dtype, str(i))
                if ops.is_dense_tensor_like(converted_elem):
                    must_pack = True
                converted_elems.append(converted_elem)
            else:
                converted_elems.append(elem)

错误显示为:
TypeError: Cannot convert a list containing a tensor of dtype to (Tensor is: )

有没有遇到相同问题的,怎么解决啊,找了好多,都没有遇到靠谱的。

  • 写回答

1条回答 默认 最新

  • threenewbee 2019-02-24 23:53
    关注

    假定程序本身是对的,那么你需要检查你的输入的数据是否正确,还有你的tensorflow的版本和你的程序作者用的版本是否兼容。
    tf有很多版本彼此兼容性都不好,所以你要找和作者一致或者接近的版本跑你的程序

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型