MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / f

Method f

tensorflow/python/eager/wrap_function_test.py:49–56  ·  view source on GitHub ↗
(x, do_add)

Source from the content-addressed store, hash-verified

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])

Callers

nothing calls this directly

Calls 10

assign_addMethod · 0.95
assign_subMethod · 0.95
read_valueMethod · 0.95
VariableMethod · 0.80
add_to_collectionMethod · 0.80
control_dependenciesMethod · 0.45
appendMethod · 0.45
constantMethod · 0.45
identityMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected