tf.SparseTensor.shape

tf.SparseTensor.shape A 1-D Tensor of int64 representing the shape of the dense tensor.

tf.SparseTensor.graph

tf.SparseTensor.graph The Graph that contains the index, value, and shape tensors.

tf.SparseTensor.indices

tf.SparseTensor.indices The indices of non-zero values in the represented dense tensor. Returns: A 2-D Tensor of int64 with shape [N, ndims], where N is the number of non-zero values in the tensor, and ndims is the rank.

tf.SparseTensor.op

tf.SparseTensor.op The Operation that produces values as an output.

tf.SparseTensor.from_value()

tf.SparseTensor.from_value(cls, sparse_tensor_value)

tf.SparseTensor

class tf.SparseTensor Represents a sparse tensor. TensorFlow represents a sparse tensor as three separate dense tensors: indices, values, and shape. In Python, the three tensors are collected into a SparseTensor class for ease of use. If you have separate indices, values, and shape tensors, wrap them in a SparseTensor object before passing to the ops below. Concretely, the sparse tensor SparseTensor(indices, values, shape) comprises the following components, where N and ndims are the number of

tf.SparseTensor.eval()

tf.SparseTensor.eval(feed_dict=None, session=None) Evaluates this sparse tensor in a Session. Calling this method will execute all preceding operations that produce the inputs needed for the operation that produces this tensor. N.B. Before invoking SparseTensor.eval(), its graph must have been launched in a session, and either a default session must be available, or session must be specified explicitly. Args: feed_dict: A dictionary that maps Tensor objects to feed values. See Session.run() f

tf.SparseTensor.dtype

tf.SparseTensor.dtype The DType of elements in this tensor.

tf.sign()

tf.sign(x, name=None) Returns an element-wise indication of the sign of a number. y = sign(x) = -1 if x < 0; 0 if x == 0; 1 if x > 0. For complex numbers, y = sign(x) = x / |x| if x != 0, otherwise y = 0. Args: x: A Tensor or SparseTensor. Must be one of the following types: half, float32, float64, int32, int64, complex64, complex128. name: A name for the operation (optional). Returns: A Tensor or SparseTensor, respectively. Has the same type as x.

tf.sin()

tf.sin(x, name=None) Computes sin of x element-wise. Args: x: A Tensor. Must be one of the following types: half, float32, float64, complex64, complex128. name: A name for the operation (optional). Returns: A Tensor. Has the same type as x.