tf.while_loop(cond, body, loop_vars, shape_invariants=None, parallel_iterations=10, back_prop=True, swap_memory=False, name=None, maximum_iterations=None, return_same_structure=False) tf.while_loop 可以这样理解: loop = [] while cond(loop): loop = body(loop…