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

Method f

tensorflow/compiler/tests/cond_test.py:48–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47 @function.defun
48 def f():
49 ta = tensor_array_ops.TensorArray(dtype=dtypes.float32, size=1)
50 output = control_flow_ops.cond(
51 constant_op.constant(True),
52 lambda: ta.write(0, 5.), lambda: ta.write(0, 10.))
53
54 return output.stack()
55
56 output_t = f()
57 self.assertAllEqual([5.], self.evaluate(output_t))

Callers 15

GetScaleAndOffsetValuesFunction · 0.45
testFloatMethod · 0.45
testFloatMethod · 0.45
testScalarInputMethod · 0.45
testConstModelMethod · 0.45
testVariableModelMethod · 0.45
testSignaturesMethod · 0.45
testConstantFoldingMethod · 0.45
LogDumpGraphDefFunction · 0.45
GetFloatAttrFunction · 0.45
TEST_FFunction · 0.45

Calls 5

writeMethod · 0.95
TensorArrayMethod · 0.80
condMethod · 0.45
constantMethod · 0.45
stackMethod · 0.45

Tested by

no test coverage detected