MCPcopy Create free account
hub / github.com/activeloopai/deeplake / _to_tensor_spec

Function _to_tensor_spec

python/deeplake/_tensorflow.py:14–23  ·  view source on GitHub ↗
(col: deeplake.ColumnDefinition)

Source from the content-addressed store, hash-verified

12
13
14def _to_tensor_spec(col: deeplake.ColumnDefinition):
15 dtype = col.dtype.id
16 if dtype == "text":
17 dtype = "string"
18
19 shape = col.dtype.shape
20 if not shape:
21 shape = ()
22
23 return tf.TensorSpec(shape=shape, dtype=dtype)
24
25
26def _from_dataset(ds: deeplake.Dataset):

Callers 1

_from_datasetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected