LostTech.TensorFlow : API Documentation

Type sparse_tensor

Namespace tensorflow.python.framework.sparse_tensor

Public static methods

bool is_sparse(ndarray x)

bool is_sparse(CompositeTensor x)

bool is_sparse(int x)

bool is_sparse(IGraphNodeBase x)

Returns whether a tensor is a sparse tensor.
Returns
bool
A boolean.

Example: ```python >>> from keras import backend as K >>> a = K.placeholder((2, 2), sparse=False) >>> print(K.is_sparse(a)) False >>> b = K.placeholder((2, 2), sparse=True) >>> print(K.is_sparse(b)) True ```

bool is_sparse(object x)

bool is_sparse(string x)

object is_sparse_dyn(object x)

Returns whether a tensor is a sparse tensor.
Returns
object
A boolean.

Example: ```python >>> from keras import backend as K >>> a = K.placeholder((2, 2), sparse=False) >>> print(K.is_sparse(a)) False >>> b = K.placeholder((2, 2), sparse=True) >>> print(K.is_sparse(b)) True ```

Public properties

PythonFunctionContainer is_sparse_fn get;

PythonFunctionContainer SparseTensor_fn get;

PythonFunctionContainer SparseTensorSpec_fn get;

PythonFunctionContainer SparseTensorValue_fn get;