Searched refs:shallow_tree (Results 1 – 5 of 5) sorted by relevance
/external/tensorflow/tensorflow/python/util/ |
D | nest_test.py | 623 shallow_tree = [[True, True], [False, True]] 624 flattened_input_tree = nest.flatten_up_to(shallow_tree, input_tree) 625 flattened_shallow_tree = nest.flatten_up_to(shallow_tree, shallow_tree) 631 shallow_tree = [["level_1", ["level_2", ["level_3", ["level_4"]]]]] 632 input_tree_flattened_as_shallow_tree = nest.flatten_up_to(shallow_tree, 641 shallow_tree = {"a": 0, "b": 0, "d": [0, 0]} 642 input_tree_flattened_as_shallow_tree = nest.flatten_up_to(shallow_tree, 650 shallow_tree = ab_tuple(a=0, b=1) 651 input_tree_flattened_as_shallow_tree = nest.flatten_up_to(shallow_tree, 660 shallow_tree = input_tree [all …]
|
D | nest.py | 952 def _yield_flat_up_to(shallow_tree, input_tree, is_seq, path=()): argument 969 if not is_seq(shallow_tree): 973 for shallow_key, shallow_subtree in _yield_sorted_items(shallow_tree): 982 def assert_shallow_structure(shallow_tree, argument 1026 if is_seq(shallow_tree): 1032 if isinstance(shallow_tree, _wrapt.ObjectProxy): 1033 shallow_type = type(shallow_tree.__wrapped__) 1035 shallow_type = type(shallow_tree) 1040 shallow_is_namedtuple = _is_namedtuple(shallow_tree, False) 1043 if not _same_namedtuples(shallow_tree, input_tree): [all …]
|
/external/tensorflow/tensorflow/python/data/util/ |
D | nest_test.py | 320 shallow_tree = ((True, True), (False, True)) 321 flattened_input_tree = nest.flatten_up_to(shallow_tree, input_tree) 322 flattened_shallow_tree = nest.flatten_up_to(shallow_tree, shallow_tree) 327 shallow_tree = (("level_1", ("level_2", ("level_3", ("level_4"))))) 328 input_tree_flattened_as_shallow_tree = nest.flatten_up_to(shallow_tree, 338 shallow_tree = "shallow_tree" 339 flattened_input_tree = nest.flatten_up_to(shallow_tree, input_tree) 340 flattened_shallow_tree = nest.flatten_up_to(shallow_tree, shallow_tree) 342 self.assertEqual(flattened_shallow_tree, [shallow_tree]) 345 shallow_tree = "shallow_tree" [all …]
|
D | nest.py | 221 def _yield_flat_up_to(shallow_tree, input_tree): argument 223 if is_sequence(shallow_tree): 224 for shallow_branch, input_branch in zip(_yield_value(shallow_tree), 232 def assert_shallow_structure(shallow_tree, input_tree, check_types=True): argument 268 if is_sequence(shallow_tree): 274 if check_types and not isinstance(input_tree, type(shallow_tree)): 278 % (type(input_tree), type(shallow_tree))) 280 if len(input_tree) != len(shallow_tree): 284 % (len(input_tree), len(shallow_tree))) 286 if check_types and isinstance(shallow_tree, _collections_abc.Mapping): [all …]
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.__internal__.nest.pbtxt | 5 …argspec: "args=[\'shallow_tree\', \'input_tree\', \'check_types\', \'expand_composites\'], varargs… 25 argspec: "args=[\'shallow_tree\', \'func\'], varargs=inputs, keywords=kwargs, defaults=None"
|