Home
last modified time | relevance | path

Searched refs:map_structure (Results 1 – 25 of 65) sorted by relevance

123

/external/tensorflow/tensorflow/python/data/util/
Dnest_test.py236 structure1_plus1 = nest.map_structure(lambda x: x + 1, structure1)
241 structure1_plus_structure2 = nest.map_structure(
247 self.assertEqual(3, nest.map_structure(lambda x: x - 1, 4))
249 self.assertEqual(7, nest.map_structure(lambda x, y: x + y, 3, 4))
252 nest.map_structure("bad", structure1_plus1)
255 nest.map_structure(lambda x, y: None, 3, (3,))
258 nest.map_structure(lambda x, y: None, ((3, 4), 5), {"a": (3, 4), "b": 5})
261 nest.map_structure(lambda x, y: None, ((3, 4), 5), (3, (4, 5)))
264 nest.map_structure(lambda x, y: None, ((3, 4), 5), (3, (4, 5)),
268 nest.map_structure(lambda x: None, structure1, foo="a")
[all …]
Dsparse_test.py320 shapes = nest.map_structure(lambda _: tensor_shape.TensorShape(None),
322 types = nest.map_structure(lambda _: dtypes.int32, classes)
350 shapes = nest.map_structure(lambda _: tensor_shape.TensorShape(None),
352 types = nest.map_structure(lambda _: dtypes.int32, classes)
Dstructure.py406 return nest.map_structure(
410 return nest.map_structure(
414 return nest.map_structure(
418 return NestedStructure(nest.map_structure(
422 return NestedStructure(nest.map_structure(
/external/tensorflow/tensorflow/contrib/seq2seq/python/ops/
Dbasic_decoder.py91 output_shape_with_unknown_batch = nest.map_structure(
96 return nest.map_structure(lambda s: s[1:], layer_output_shape)
112 nest.map_structure(lambda _: dtype, self._rnn_output_size()),
204 output_shape_with_unknown_batch = nest.map_structure(
208 return nest.map_structure(lambda s: s[1:], layer_output_shape)
224 nest.map_structure(lambda _: dtype, self._rnn_output_size()),
Ddecoder.py265 return nest.map_structure(_create, size, dtype)
374 initial_outputs_ta = nest.map_structure(_create_ta, decoder.output_size,
414 emit = nest.map_structure(
432 next_state = nest.map_structure(
437 outputs_ta = nest.map_structure(lambda ta, out: ta.write(time, out),
461 final_outputs = nest.map_structure(lambda ta: ta.stack(), final_outputs_ta)
470 final_outputs = nest.map_structure(_transpose_batch_time, final_outputs)
Dsampler.py234 inputs = nest.map_structure(_transpose_batch_time, inputs)
236 self.input_tas = nest.map_structure(_unstack_ta, inputs)
246 self.zero_inputs = nest.map_structure(
256 lambda: nest.map_structure(lambda inp: inp.read(0), self.input_tas))
276 lambda: nest.map_structure(read_from_ta, self.input_tas))
420 maybe_concatenated_inputs = nest.map_structure(
423 auxiliary_inputs = nest.map_structure(_transpose_batch_time,
426 self._auxiliary_input_tas = nest.map_structure(_unstack_ta,
456 auxiliary_inputs = nest.map_structure(lambda ta: ta.read(next_time),
460 return nest.map_structure(lambda x, y: array_ops.concat((x, y), -1),
Dhelper.py250 inputs = nest.map_structure(_transpose_batch_time, inputs)
252 self._input_tas = nest.map_structure(_unstack_ta, inputs)
260 self._zero_inputs = nest.map_structure(
291 lambda: nest.map_structure(lambda inp: inp.read(0), self._input_tas))
311 lambda: nest.map_structure(read_from_ta, self._input_tas))
462 maybe_concatenated_inputs = nest.map_structure(
466 auxiliary_inputs = nest.map_structure(
470 nest.map_structure(_unstack_ta, auxiliary_inputs)
515 auxiliary_inputs = nest.map_structure(
519 return nest.map_structure(
Dbeam_search_decoder.py126 return nest.map_structure(lambda t_: _tile_batch(t_, multiplier), t)
307 output_shape_with_unknown_batch = nest.map_structure(
311 return nest.map_structure(lambda s: s[1:], layer_output_shape)
362 final_state = final_state._replace(cell_state=nest.map_structure(
556 inputs = nest.map_structure(
558 cell_state = nest.map_structure(self._maybe_merge_batch_beams, cell_state,
561 cell_outputs = nest.map_structure(
563 next_cell_state = nest.map_structure(
695 self._initial_cell_state = nest.map_structure(
748 scores=nest.map_structure(lambda _: dtype, self._rnn_output_size()),
[all …]
/external/tensorflow/tensorflow/python/util/
Dnest_test.py403 structure1_plus1 = nest.map_structure(lambda x: x + 1, structure1)
408 structure1_plus_structure2 = nest.map_structure(
414 self.assertEqual(3, nest.map_structure(lambda x: x - 1, 4))
416 self.assertEqual(7, nest.map_structure(lambda x, y: x + y, 3, 4))
419 self.assertEqual((), nest.map_structure(lambda x: x + 1, ()))
420 self.assertEqual([], nest.map_structure(lambda x: x + 1, []))
421 self.assertEqual({}, nest.map_structure(lambda x: x + 1, {}))
422 self.assertEqual(NestTest.EmptyNT(), nest.map_structure(lambda x: x + 1,
426 self.assertNotEqual((), nest.map_structure(lambda x: x + 1, []))
429 nest.map_structure("bad", structure1_plus1)
[all …]
Dnest.py290 str1 = str(map_structure(lambda _: _DOT, nest1))
291 str2 = str(map_structure(lambda _: _DOT, nest2))
445 def map_structure(func, *structure, **kwargs): function
/external/tensorflow/tensorflow/python/data/ops/
Diterator_ops.py180 output_types = nest.map_structure(dtypes.as_dtype, output_types)
182 output_shapes = nest.map_structure(
188 output_classes = nest.map_structure(lambda _: ops.Tensor, output_types)
268 output_types = nest.map_structure(dtypes.as_dtype, output_types)
270 output_shapes = nest.map_structure(
276 output_classes = nest.map_structure(lambda _: ops.Tensor, output_types)
/external/tensorflow/tensorflow/python/keras/engine/
Dbase_layer.py469 inputs = nest.map_structure(
482 return nest.map_structure(lambda t: t.shape, outputs)
541 inputs = nest.map_structure(_convert_non_tensor, inputs)
1627 inbound_layers = nest.map_structure(lambda t: t._keras_history[0],
1629 node_indices = nest.map_structure(lambda t: t._keras_history[1],
1631 tensor_indices = nest.map_structure(lambda t: t._keras_history[2],
1706 input_shapes = nest.map_structure(lambda x: x.shape, inputs)
1715 input_shapes = nest.map_structure(lambda x: x.shape, inputs)
1723 return nest.map_structure(_make_placeholder_like, output_shapes)
1937 self.input_shapes = nest.map_structure(backend.int_shape, input_tensors)
[all …]
Dbase_layer_utils.py225 return nest.map_structure(_collect_previous_mask, input_tensors)
382 nest.map_structure(_mark_checked, tensors)
/external/tensorflow/tensorflow/python/ops/
Dfunctional_ops.py126 elems_ta = nest.map_structure(create_ta, elems)
129 a = nest.map_structure(lambda elem: elem.read(0), elems_ta)
136 elem_i = nest.map_structure(lambda elem: elem.read(i), elems_ta)
235 elems_ta = nest.map_structure(create_ta, elems)
239 a = nest.map_structure(lambda elem: elem.read(i), elems_ta)
246 elem = nest.map_structure(lambda elem: elem.read(i), elems_ta)
Dcontrol_flow_ops.py191 return nest.map_structure(_Identity, data, expand_composites=True)
204 return nest.map_structure(_NextIteration, data, expand_composites=True)
250 return nest.map_structure(enter_component, data, expand_composites=True)
274 return nest.map_structure(exit, data, expand_composites=True)
570 return nest.map_structure(update_component, m, v, expand_composites=True)
1488 nest.map_structure(lambda x: self._outer_context.AddName(x.name), result,
1797 v = nest.map_structure(_convert_tensorarray_to_flow, v,
1814 original_result = nest.map_structure(array_ops.identity,
1820 result = nest.map_structure(self._BuildCondTensor, original_result,
2939 body_result = nest.map_structure(map_fn, body_result,
[all …]
/external/tensorflow/tensorflow/contrib/recurrent/python/ops/
Drecurrent.py82 return nest.map_structure(lambda x: array_ops.gather(x, index), struct)
178 return nest.map_structure(_EmptyAccForTensor, struct_template)
191 return nest.map_structure(
714 inputs = nest.map_structure(lambda x: array_ops.squeeze(x, axis=0), inputs)
716 acc_state = nest.map_structure(lambda x: array_ops.expand_dims(x, axis=0),
727 extras = nest.map_structure(array_ops.zeros_like, extras)
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_MutexLock.pbtxt41 r = nest.map_structure(tf.identity, r)
44 return nest.map_structure(tf.identity, r)
/external/tensorflow/tensorflow/python/eager/
Dwrap_function.py206 pruned_graph.structured_outputs = nest.map_structure(
389 nest.map_structure(import_graph.as_graph_element, inputs),
390 nest.map_structure(import_graph.as_graph_element, outputs))
/external/tensorflow/tensorflow/lite/experimental/examples/lstm/
Drnn.py273 outputs = nest.map_structure(_transpose_batch_time, outputs)
408 inputs_reverse = nest.map_structure(_map_reverse, inputs)
/external/tensorflow/tensorflow/contrib/seq2seq/python/kernel_tests/
Dattention_wrapper_v2_test.py376 final_output_info = nest.map_structure(get_result_summary,
378 final_state_info = nest.map_structure(get_result_summary,
383 nest.map_structure(self.assertAllCloseOrEqual, expected_final_output,
385 nest.map_structure(self.assertAllCloseOrEqual, expected_final_state,
388 final_alignment_history_info = nest.map_structure(
391 nest.map_structure(
Dattention_wrapper_test.py263 final_output_info = nest.map_structure(get_result_summary,
265 final_state_info = nest.map_structure(get_result_summary,
270 nest.map_structure(self.assertAllCloseOrEqual, expected_final_output,
272 nest.map_structure(self.assertAllCloseOrEqual, expected_final_state,
275 final_alignment_history_info = nest.map_structure(
279 nest.map_structure(
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.nest.pbtxt16 name: "map_structure"
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.nest.pbtxt16 name: "map_structure"
/external/tensorflow/tensorflow/python/distribute/
Dparameter_server_strategy.py415 return nest.map_structure(_select_fn, structured)
429 return nest.map_structure(self._local_results, result)
439 return nest.map_structure(self._local_results, result)
/external/tensorflow/tensorflow/python/keras/layers/
Dtensorflow_op_layer_test.py162 np_inputs = nest.map_structure(lambda x: np.ones((10, 10), 'float32'),
164 np_outputs = nest.map_structure(lambda x: np.ones((10, 10), 'float32'),

123