天津市区200余处电子警察 24小时无缝“抓”违停
- paddle.Tensor. values ( self: Tensor ) Tensor
-
- Notes:
-
百度 奶奶赶紧探头出去,这才发现孙女已经坠落楼下…… 发稿时,记者从姚桥派出所获悉,悲剧发生后,派出所领导和民警全力介入,积极妥善处置这一意外事件。
This API is ONLY available in Dygraph mode
Get the values of current SparseTensor(COO or CSR).
- Returns
-
A DenseTensor
- Return type
-
Tensor
Examples
>>> import paddle >>> indices = [[0, 0, 1, 2, 2], [1, 3, 2, 0, 1]] >>> values = [1, 2, 3, 4, 5] >>> dense_shape = [3, 4] >>> sparse_x = paddle.sparse.sparse_coo_tensor(paddle.to_tensor(indices, dtype='int32'), paddle.to_tensor(values, dtype='float32'), shape=dense_shape) >>> print(sparse_x.values()) Tensor(shape=[5], dtype=float32, place=Place(cpu), stop_gradient=True, [1., 2., 3., 4., 5.])