【发布时间】:2018-06-14 18:08:11
【问题描述】:
我真的很困惑这种方法,尤其是当我发现这个令人费解的陈述时:
output.set_shape(tensor_shape.TensorShape([None]).concatenate(shape))
这里有一些cmets作为方法的描述:
This operation concatenates queue-element component tensors along
the 0th dimension to make a single component tensor. If the queue
has not been closed, all of the components in the dequeued tuple
will have size `n` in the 0th dimension.
在形状的第 0 维指定 None 太奇怪了(我想它可能是 n?),这似乎与描述中的 size 'n' 相矛盾。这导致我的程序出现形状错误,我无法理解原因,尽管我已经找到了它的位置。
你能告诉我为什么在这里使用TensorShape([None])吗?
【问题讨论】:
-
请阅读Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - 总结是这不是解决志愿者的理想方式,并且可能会适得其反。请不要将此添加到您的问题中。
标签: python tensorflow machine-learning deep-learning computer-vision