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

Method __init__

tensorflow/python/data/ops/dataset_ops.py:2448–2457  ·  view source on GitHub ↗

See `Dataset.from_tensors()` for details.

(self, element)

Source from the content-addressed store, hash-verified

2446 """A `Dataset` with a single element."""
2447
2448 def __init__(self, element):
2449 """See `Dataset.from_tensors()` for details."""
2450 element = structure.normalize_element(element)
2451 self._structure = structure.type_spec_from_value(element)
2452 self._tensors = structure.to_tensor_list(self._structure, element)
2453
2454 variant_tensor = gen_dataset_ops.tensor_dataset(
2455 self._tensors,
2456 output_shapes=structure.get_flat_tensor_shapes(self._structure))
2457 super(TensorDataset, self).__init__(variant_tensor)
2458
2459 @property
2460 def element_spec(self):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected