()
| 98 | |
| 99 | @def_function.function |
| 100 | def BuildWhile(): |
| 101 | x = constant_op.constant(1., dtypes.float32) |
| 102 | |
| 103 | def Body(x): |
| 104 | return math_ops.cast(x, dtypes.float16) + 1 |
| 105 | |
| 106 | while_loop_v2(lambda x: x < 10, Body, [x]) |
| 107 | |
| 108 | with self.assertRaisesRegexp( |
| 109 | TypeError, |
nothing calls this directly
no test coverage detected