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

Method to_list

tensorflow/python/ops/ragged/ragged_tensor.py:1794–1807  ·  view source on GitHub ↗

Returns a nested Python `list` with the values for this `RaggedTensor`. Requires that `rt` was constructed in eager execution mode. Returns: A nested Python `list`.

(self)

Source from the content-addressed store, hash-verified

1792 #=============================================================================
1793
1794 def to_list(self):
1795 """Returns a nested Python `list` with the values for this `RaggedTensor`.
1796
1797 Requires that `rt` was constructed in eager execution mode.
1798
1799 Returns:
1800 A nested Python `list`.
1801 """
1802 if self._is_eager():
1803 return self._eager_value().to_list()
1804 else:
1805 raise ValueError("RaggedTensor.to_list() is only supported in eager "
1806 "mode; in graph mode, evaluate the RaggedTensor first "
1807 "and then use RaggedTensorValue.to_list().")
1808
1809 def _eager_value(self):
1810 """Returns a RaggedTensorValue for self. Requires self._is_eager()=true."""

Callers 14

__repr__Method · 0.95
assertAllEqualMethod · 0.45
testSessionRunMethod · 0.45
testSessionRunFeedMethod · 0.45
testRaggedValuesMethod · 0.45
_GetPyListMethod · 0.45
_clone_sequential_modelFunction · 0.45
add_updateMethod · 0.45
compute_output_shapeMethod · 0.45
buildMethod · 0.45

Calls 2

_is_eagerMethod · 0.95
_eager_valueMethod · 0.95

Tested by 6

assertAllEqualMethod · 0.36
testSessionRunMethod · 0.36
testSessionRunFeedMethod · 0.36
testRaggedValuesMethod · 0.36
_GetPyListMethod · 0.36