我是Tensorflow的新手,我希望有人能帮助我调试我面临的一个快速错误。在def _examples(file_name_queue, reader, num_threads, read_batch_size):
with ops.name_scope('read'):
for _ in range(num_threads):
keys, values = tf.cond(
math_ops.less(1, read_batch_size),
lambda: reader().read_up_to(file_name_queue, read_batch_size),
lambda: reader().read(file_name_queue)
)
# More after this but dropping for brevity.
然而,我得到了下面的错误,似乎是来自于真和假传输条件不是同班同学。在TypeError: Incompatible return types of true_fn and false_fn: The two
structures don't have the same sequence type. First structure has type
, while second
structure has type .
解决这个问题最好的办法是什么?有没有一种方法可以强制转换这些类,重写true或false,或者其他方法来修改lambdas以统一序列类型?在
先谢谢你!在