tf.raw_ops.SparseSlice
Stay organized with collections
Save and categorize content based on your preferences.
Slice a SparseTensor
based on the start
and size
.
tf.raw_ops.SparseSlice(
indices, values, shape, start, size, name=None
)
For example, if the input is
input_tensor = shape = [2, 7]
[ a d e ]
[b c ]
Graphically the output tensors are:
sparse_slice([0, 0], [2, 4]) = shape = [2, 4]
[ a ]
[b c ]
sparse_slice([0, 4], [2, 3]) = shape = [2, 3]
[ d e ]
[ ]
Args |
indices
|
A Tensor of type int64 .
2-D tensor represents the indices of the sparse tensor.
|
values
|
A Tensor . 1-D tensor represents the values of the sparse tensor.
|
shape
|
A Tensor of type int64 .
1-D. tensor represents the shape of the sparse tensor.
|
start
|
A Tensor of type int64 .
1-D. tensor represents the start of the slice.
|
size
|
A Tensor of type int64 .
1-D. tensor represents the size of the slice.
output indices: A list of 1-D tensors represents the indices of the output
sparse tensors.
|
name
|
A name for the operation (optional).
|
Returns |
A tuple of Tensor objects (output_indices, output_values, output_shape).
|
output_indices
|
A Tensor of type int64 .
|
output_values
|
A Tensor . Has the same type as values .
|
output_shape
|
A Tensor of type int64 .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2022-10-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-10-27 UTC."],[],[]]