- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
现在我正在使用 tensorflow 编写一个程序来验证模型。我使用 FIFOQueue 对输入数据进行排队。例如,我有 50,000 张图像并一次将 100 张图像放入队列。除了最后的迭代外,该程序运行良好。在最后的迭代中,它显示了错误
“E tensorflow/core/client/tensor_c_api.cc:485] FIFOQueue '_0_path_queue' 已关闭且元素不足(请求 1,当前大小为 0)
[[节点:path_queue_Dequeue = QueueDequeue_class=["loc:@path_queue"], component_types=[DT_INT32, DT_BOOL, DT_STRING], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu: 0"]]"
我认为这是因为它试图将 50,001~50,100 张图像排入队列,但无法实现。但是,我不需要将这些图像排入队列,也不会使用它们。我怎样才能避免这个错误?
另一个问题是,如果我想使用 dequeue_many(100),那么图像总数不能被 100 整除,比如 45678。在这种情况下,tensorflow 会抛出错误。我该如何解决这个问题?
谢谢。
最佳答案
试试 dequeue_up_to
而不是 dequeue_many
:
https://www.tensorflow.org/versions/r0.10/api_docs/python/io_ops.html
希望有帮助!
关于Tensorflow FIFOQueue 错误 : FIFOQueue is closed and has insufficient elements,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39003340/
现在我正在使用 tensorflow 编写一个程序来验证模型。我使用 FIFOQueue 对输入数据进行排队。例如,我有 50,000 张图像并一次将 100 张图像放入队列。除了最后的迭代外,该程序
我正在使用 Tensorflow 中的 tf.train.GradientDescentOptimizer() 训练线性回归问题。一般来说,我可以使用 placeholders 和 feed_dict
我在 tensorflow 中使用这种编程格式与其他操作取得了一些成功,但我无法让 FIFOQueue 正常工作。以下代码将编译并运行,但队列中永远不会有任何数据。 vector outputs; S
我在使用队列时遇到 tensorflow 读取图像的问题。请让我知道我在做什么错误。下面是代码。 import tensorflow as tf slim = tf.contrib.slim from
我是一名优秀的程序员,十分优秀!