/external/tensorflow/tensorflow/python/framework/ |
H A D | sparse_tensor.py | 40 `indices`, `values`, and `dense_shape`. In Python, the three tensors are 42 `indices`, `values`, and `dense_shape` tensors, wrap them in a `SparseTensor` 45 Concretely, the sparse tensor `SparseTensor(indices, values, dense_shape)` 49 * `indices`: A 2-D int64 tensor of dense_shape `[N, ndims]`, which specifies 55 * `values`: A 1-D tensor of any type and dense_shape `[N]`, which supplies the 61 * `dense_shape`: A 1-D int64 tensor of dense_shape `[ndims]`, which specifies 62 the dense_shape of the sparse tensor. Takes a list indicating the number of 63 elements in each dimension. For example, `dense_shape=[3,6]` specifies a 64 two-dimensional 3x6 tensor, `dense_shape 181 def dense_shape(self): member in class:SparseTensor [all...] |
H A D | ops.py | 1358 def __init__(self, values, indices, dense_shape=None): 1360 _get_graph_from_inputs([values, indices, dense_shape]) 1363 self._dense_shape = dense_shape 1376 def dense_shape(self): member in class:IndexedSlices 1407 self._indices, self._values, (", dense_shape=%s" % self._dense_shape) 1411 return IndexedSlices(-self.values, self.indices, self.dense_shape) 1415 "IndexedSlicesValue", ["values", "indices", "dense_shape"])
|
/external/tensorflow/tensorflow/core/kernels/data/ |
H A D | sparse_tensor_slice_dataset_op.cc | 65 std::vector<int64> dense_shape; variable 66 dense_shape.reserve(sparse_tensor_.shape().size()); 68 dense_shape.emplace_back(sparse_tensor_.shape()[i]); 69 TF_RETURN_IF_ERROR(b->AddVector(dense_shape, &dense_shape_node)); 222 const Tensor* dense_shape; variable 223 OP_REQUIRES_OK(ctx, ctx->input("dense_shape", &dense_shape)); 233 OP_REQUIRES(ctx, TensorShapeUtils::IsVector(dense_shape->shape()), 236 dense_shape->shape().DebugString())); 254 gtl::InlinedVector<int64, 8> std_order(dense_shape [all...] |
/external/tensorflow/tensorflow/contrib/lite/kernels/ |
H A D | embedding_lookup_sparse.cc | 18 // indices, and dense_shape. The representation assume that the corresponding 20 // * dense.shape = dense_shape 48 // Where dense_shape == [l0, ..., ln] and Tensor[4].dim == [e0, e1, ..., em] 144 TfLiteTensor* dense_shape = GetInput(context, node, 2); local 157 // (loopkup, indices, dense_shape) is consistent. 158 TF_LITE_ENSURE_EQ(context, SizeOfDimension(dense_shape, 0), lookup_rank); 166 const int dim = dense_shape->data.i32[i]; 201 stride *= dense_shape->data.i32[k];
|
/external/tensorflow/tensorflow/core/kernels/ |
H A D | sparse_fill_empty_rows_op.cc | 49 OP_REQUIRES_OK(context, context->input("dense_shape", &dense_shape_t)); 55 errors::InvalidArgument("dense_shape must be a vector, saw: ", 68 // dense_shape. Also add check that dense rank > 0. 73 const auto dense_shape = dense_shape_t->vec<int64>(); variable 76 const int64 dense_rows = dense_shape(0); 94 errors::InvalidArgument("Received SparseTensor with dense_shape[0] = "
|
/external/tensorflow/tensorflow/core/util/ |
H A D | example_proto_helper.h | 181 TensorShape dense_shape; local 185 dense_shape.AddDim(dense_shapes[i].dim_size(d)); 189 dense_shapes[i].AsTensorShape(&dense_shape); 191 elements_per_stride.push_back(dense_shape.num_elements()); 247 TensorShape dense_shape; local 251 dense_shape.AddDim(dense_shapes[i].dim_size(d)); 255 dense_shapes[i].AsTensorShape(&dense_shape); 257 elements_per_stride.push_back(dense_shape.num_elements());
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
H A D | sparse_ops_test.py | 48 indices=x_indices, values=x_values, dense_shape=x_shape), len(x_values) 138 self.assertAllEqual(output.dense_shape, [3, vocab_size]) 144 self.assertAllEqual(output.dense_shape, [3, vocab_size]) 239 self.assertAllEqual(output.dense_shape, [3] + vocab_size) 292 self.assertAllEqual(output.dense_shape, [5, 6]) 304 self.assertAllEqual(output.dense_shape, [5, 6]) 356 self.assertAllEqual(output.dense_shape, [3, 6, 7]) 369 self.assertAllEqual(output.dense_shape, [3, 6, 7]) 383 self.assertAllEqual(output.dense_shape, [3, 6, 7]) 395 self.assertAllEqual(output.dense_shape, [ 589 dense_shape = np.array([2, 3]).astype(np.int64) variable in class:SparseReduceTest [all...] |