jina.types.ndarray.sparse.tensorflow¶
-
class
jina.types.ndarray.sparse.tensorflow.
SparseNdArray
(*args, **kwargs)[source]¶ Bases:
jina.types.ndarray.sparse.BaseSparseNdArray
Tensorflow powered sparse ndarray, i.e. SparseTensor
- Parameters
proto – the protobuf message, when not given then create a new one via
get_null_proto()
-
sparse_constructor
(indices, values, shape)[source]¶ Sparse NdArray constructor, must be implemented by subclass
- Parameters
indices (np.ndarray) – the indices of the sparse array
values (np.ndarray) – the values of the sparse array
shape (
List
[int
]) – the shape of the dense array
- Return type
SparseTensor
- Returns