/external/tensorflow/tensorflow/python/autograph/converters/ |
D | return_statements_test.py | 29 def assertTransformedEquivalent(self, test_fn, *inputs): argument 31 with self.converted(test_fn, return_statements, ns) as result: 32 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs)) 36 def test_fn(x): function 39 self.assertTransformedEquivalent(test_fn, 2) 43 def test_fn(x): function 49 self.assertTransformedEquivalent(test_fn, 2) 50 self.assertTransformedEquivalent(test_fn, -2) 54 def test_fn(x): function 58 self.assertTransformedEquivalent(test_fn, 2) [all …]
|
D | continue_statements_test.py | 30 def assertTransformedEquivalent(self, test_fn, *inputs): argument 31 with self.converted(test_fn, continue_statements, {'ops': ops}, 33 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs)) 37 def test_fn(x): function 46 self.assertTransformedEquivalent(test_fn, 0) 47 self.assertTransformedEquivalent(test_fn, 1) 48 self.assertTransformedEquivalent(test_fn, 3) 49 self.assertTransformedEquivalent(test_fn, 4) 53 def test_fn(a): function 62 self.assertTransformedEquivalent(test_fn, []) [all …]
|
D | control_flow_test.py | 33 def assertTransformedResult(self, test_fn, inputs, expected, symbols=None): argument 38 with self.converted(test_fn, control_flow, symbols, 40 self.assertEqual(self.evaluate(result.test_fn(*inputs)), expected) 45 def test_fn(n): function 53 self.assertTransformedResult(test_fn, constant_op.constant(5), (10, 5, 5)) 58 def test_fn(n): function 71 self.assertTransformedResult(test_fn, constant_op.constant(5), 77 def test_fn(n): function 82 self.assertTransformedResult(test_fn, constant_op.constant(5), 0) 91 def test_fn(n): function [all …]
|
D | break_statements_test.py | 29 def assertTransformedEquivalent(self, test_fn, *inputs): argument 30 with self.converted(test_fn, break_statements, {}, 32 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs)) 36 def test_fn(x): function 45 self.assertTransformedEquivalent(test_fn, 0) 46 self.assertTransformedEquivalent(test_fn, 1) 47 self.assertTransformedEquivalent(test_fn, 4) 51 def test_fn(a): function 60 with self.converted(test_fn, break_statements, {}, 64 self.assertEqual([3], result.test_fn([5, 4])) [all …]
|
D | logical_expressions_test.py | 33 def test_fn(a, b): function 36 with self.converted(test_fn, logical_expressions, {}) as result: 38 self.assertTrue(sess.run(result.test_fn(constant_op.constant(1), 1))) 39 self.assertFalse(sess.run(result.test_fn(constant_op.constant(1), 2))) 44 def test_fn(a, b, c): function 47 with self.converted(test_fn, logical_expressions, {}) as result: 50 sess.run(result.test_fn(constant_op.constant(True), False, False))) 52 sess.run(result.test_fn(constant_op.constant(True), False, True))) 57 def test_fn(a, b, c, d): function 60 with self.converted(test_fn, logical_expressions, {}) as result: [all …]
|
D | list_comprehensions_test.py | 28 def assertTransformedEquivalent(self, test_fn, *inputs): argument 29 with self.converted(test_fn, list_comprehensions, {}) as result: 30 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs)) 34 def test_fn(l): function 38 self.assertTransformedEquivalent(test_fn, []) 39 self.assertTransformedEquivalent(test_fn, [1, 2, 3]) 43 def test_fn(l): function 47 self.assertTransformedEquivalent(test_fn, []) 48 self.assertTransformedEquivalent(test_fn, [[1], [2], [3]]) 52 def test_fn(l): function [all …]
|
D | lists_test.py | 41 def test_fn(): function 44 with self.converted(test_fn, lists, {}) as result: 45 tl = result.test_fn() 52 def test_fn(): function 55 with self.converted(test_fn, lists, {}) as result: 56 self.assertAllEqual(result.test_fn(), [1, 2, 3]) 60 def test_fn(): function 67 with self.converted(test_fn, lists, ns) as result: 69 tl = result.test_fn() 75 def test_fn(): function [all …]
|
D | call_trees_test.py | 30 def test_fn(f): function 33 with self.converted(test_fn, call_trees, {}) as result: 35 result.test_fn(None), 41 def test_fn(f, a, b): function 44 with self.converted(test_fn, call_trees, {}) as result: 46 result.test_fn(None, 1, 2), 52 def test_fn(f, a, *args, **kwargs): function 55 with self.converted(test_fn, call_trees, {}) as result: 57 result.test_fn(None, 1, *[2, 3], **{'b': 4, 'c': 5}), 66 def test_fn(): function [all …]
|
D | conditional_expressions_test.py | 28 def assertTransformedEquivalent(self, test_fn, *inputs): argument 30 with self.converted(test_fn, conditional_expressions, ns) as result: 31 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs)) 35 def test_fn(x): function 38 self.assertTransformedEquivalent(test_fn, 0) 39 self.assertTransformedEquivalent(test_fn, 3) 43 def test_fn(x): function 47 self.assertTransformedEquivalent(test_fn, -2) 48 self.assertTransformedEquivalent(test_fn, 0) 49 self.assertTransformedEquivalent(test_fn, 2)
|
D | function_scopes_test.py | 34 def test_fn(l): function 40 with self.converted(test_fn, function_scopes, {}) as result: 41 result_op = result.test_fn(constant_op.constant(1)) 43 self.assertEqual('Docstring.', result.test_fn.__doc__) 50 def test_fn(): function 57 with self.converted(test_fn, function_scopes, {}, 59 result_op = result.test_fn() 61 self.assertIn('First sentence.', result.test_fn.__doc__) 62 self.assertIn('Second sentence.', result.test_fn.__doc__) 67 def test_fn(l): function [all …]
|
D | builtin_functions_test.py | 37 def test_fn(a): function 40 with self.converted(test_fn, builtin_functions, {'len': len}) as result: 43 ops = result.test_fn(p) 52 def test_fn(a): function 55 with self.converted(test_fn, builtin_functions, {'print': print}) as result: 58 sess.run(result.test_fn(constant_op.constant('a'))) 60 result.test_fn('a') 68 def test_fn(a, b, c): function 71 with self.converted(test_fn, builtin_functions, {'print': print}) as result: 75 result.test_fn( [all …]
|
D | side_effect_guards_test.py | 41 def test_fn(a): function 45 node, ctx = self.prepare(test_fn, {}) 54 self.evaluate(result.test_fn(v)) 62 def test_fn(a): function 66 node, ctx = self.prepare(test_fn, {}) 75 self.evaluate(result.test_fn(v)) 83 def test_fn(a): function 87 node, ctx = self.prepare(test_fn, {}) 96 sess.run(result.test_fn(constant_op.constant(-1))) 100 def test_fn(a): function [all …]
|
D | arg_defaults_test.py | 34 def test_fn(): function 37 node, ctx = self.prepare(test_fn, {}) 43 def test_fn(a, b, *c, **e): function 46 node, ctx = self.prepare(test_fn, {}) 54 def test_fn(a, b=1, c=2): function 57 node, ctx = self.prepare(test_fn, {}) 63 def test_fn(a, b=1, *c): # pylint: disable=keyword-arg-before-vararg function 66 node, ctx = self.prepare(test_fn, {})
|
D | error_handlers_test.py | 34 def test_fn(): function 37 with self.converted(test_fn, error_handlers, {}) as result: 40 result.test_fn() 44 def test_fn(x): function 47 node, ctx = self.prepare(test_fn, {})
|
D | directives_test.py | 34 def test_fn(): function 39 node, ctx = self.prepare(test_fn, {'directives': directives}) 50 def test_fn(a): function 53 node, ctx = self.prepare(test_fn, {'directives': directives}) 63 def test_fn(): function 68 node, ctx = self.prepare(test_fn, {'directives': directives})
|
/external/tensorflow/tensorflow/python/autograph/pyct/ |
D | cfg_test.py | 49 def test_fn(a): function 56 graphs, node = self._build_cfg(test_fn) 71 def test_fn(a): function 78 graphs, node = self._build_cfg(test_fn) 146 def test_fn(a): function 152 graph, = self._build_cfg(test_fn).values() 166 def test_fn(a, b): function 170 graph, = self._build_cfg(test_fn).values() 182 def test_fn(a): function 186 graph, = self._build_cfg(test_fn).values() [all …]
|
D | origin_info_test.py | 32 def test_fn(x): function 35 node, _, _ = parser.parse_entity(test_fn) 53 def test_fn(x): function 56 node, _, _ = parser.parse_entity(test_fn) 66 def test_fn(x): function 70 node, source, _ = parser.parse_entity(test_fn) 94 def test_fn(x): function 99 node, source, _ = parser.parse_entity(test_fn)
|
/external/tensorflow/tensorflow/python/autograph/pyct/static_analysis/ |
D | liveness_test.py | 35 def _parse_and_analyze(self, test_fn): argument 36 node, source, _ = parser.parse_entity(test_fn) 70 def test_fn(x, a): function 77 node = self._parse_and_analyze(test_fn) 85 def test_fn(x, a): function 94 node = self._parse_and_analyze(test_fn) 102 def test_fn(x, a): function 107 node = self._parse_and_analyze(test_fn) 114 def test_fn(x, a): function 119 node = self._parse_and_analyze(test_fn) [all …]
|
D | activity_test.py | 114 def _parse_and_analyze(self, test_fn): argument 115 node, source, _ = parser.parse_entity(test_fn) 145 def test_fn(a): function 151 node, _ = self._parse_and_analyze(test_fn) 168 def test_fn(a): function 174 node, _ = self._parse_and_analyze(test_fn) 186 def test_fn(a): function 191 node, _ = self._parse_and_analyze(test_fn) 201 def test_fn(a): function 207 node, _ = self._parse_and_analyze(test_fn) [all …]
|
D | reaching_definitions_test.py | 35 def _parse_and_analyze(self, test_fn): argument 36 node, source, _ = parser.parse_entity(test_fn) 82 def test_fn(a, b): function 88 node = self._parse_and_analyze(test_fn) 100 def test_fn(a): function 107 node = self._parse_and_analyze(test_fn) 120 def test_fn(x, i): function 130 node = self._parse_and_analyze(test_fn) 143 def test_fn(x, i): function 155 node = self._parse_and_analyze(test_fn) [all …]
|
D | type_info_test.py | 62 test_fn, argument 65 node, source, _ = parser.parse_entity(test_fn) 85 def test_fn(): function 89 node = self._parse_and_analyze(test_fn, {'training': training}) 99 def test_fn(x): function 103 node = self._parse_and_analyze(test_fn, {}) 109 def test_fn(): function 113 node = self._parse_and_analyze(test_fn, {'training': training}) 120 def test_fn(x): function 124 node = self._parse_and_analyze(test_fn, {'session': session}) [all …]
|
D | live_values_test.py | 39 test_fn, argument 44 node, source, _ = parser.parse_entity(test_fn) 66 def test_fn(): function 69 node = self._parse_and_analyze(test_fn, {}, literals={'a': 'bar'}) 77 def test_fn(): function 80 node = self._parse_and_analyze(test_fn, {'a': True}) 93 def test_fn(): function 96 node = self._parse_and_analyze(test_fn, {'foo': foo}) 103 def test_fn(): function 106 node = self._parse_and_analyze(test_fn, {'constant_op': constant_op}) [all …]
|
/external/tensorflow/tensorflow/python/autograph/utils/ |
D | py_func_test.py | 31 def test_fn(a, b, c): function 35 result = py_func.wrap_py_func(test_fn, dtypes.int32, 38 result = py_func.wrap_py_func(test_fn, dtypes.int32, (1, 1, 1)) 41 test_fn, dtypes.int32, 52 def test_fn(a, b): function 56 result = py_func.wrap_py_func(test_fn, dtypes.int32, (7, TestClass())) 58 result = py_func.wrap_py_func(test_fn, dtypes.int32, 69 def test_fn(a, b, c, d): function 73 result = py_func.wrap_py_func(test_fn, dtypes.int32, (7, TestClass(5)), { 78 result = py_func.wrap_py_func(test_fn, dtypes.int32, [all …]
|
/external/tensorflow/tensorflow/python/autograph/core/ |
D | converter_test.py | 50 reparsed_opts = reparsed.test_fn() 66 def test_fn(): function 71 node, ctx = self.prepare(test_fn, ns) 87 def test_fn(): function 92 node, ctx = self.prepare(test_fn, ns) 103 def test_fn(): function 110 node, ctx = self.prepare(test_fn, ns) 130 def test_fn(): function 137 node, ctx = self.prepare(test_fn, ns)
|
/external/tensorflow/tensorflow/python/autograph/impl/ |
D | api_test.py | 214 def test_fn(x): function 219 x = api.converted_call(test_fn, None, converter.ConversionOptions(), 226 def test_fn(x, y, z): function 232 functools.partial(test_fn, constant_op.constant(-1), z=-3), None, 238 functools.partial(test_fn, constant_op.constant(-1)), z=-3), None, 475 def test_fn(x, s): function 480 compiled_fn = api.to_graph(test_fn) 491 def test_fn(x, s=foo): function 496 compiled_fn = api.to_graph(test_fn) 504 def test_fn(x): function [all …]
|