(x, do_add)
| 47 | def testDocString(self): |
| 48 | |
| 49 | def f(x, do_add): |
| 50 | v = variables.Variable(5.0) |
| 51 | if do_add: |
| 52 | op = v.assign_add(x) |
| 53 | else: |
| 54 | op = v.assign_sub(x) |
| 55 | with ops.control_dependencies([op]): |
| 56 | return v.read_value() |
| 57 | |
| 58 | f_add = wrap_function.wrap_function( |
| 59 | f, [tensor_spec.TensorSpec((), dtypes.float32), True]) |
nothing calls this directly
no test coverage detected