@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class SparseFillEmptyRows extends Pointer
SparseTensor
with a default value.
The input SparseTensor
is represented via the tuple of inputs
(indices
, values
, dense_shape
). The output SparseTensor
has the
same dense_shape
but with indices output_indices
and values
output_values
.
This op inserts a single entry for every row that doesn't have any values.
The index is created as [row, 0, ..., 0]
and the inserted value
is default_value
.
For example, suppose sp_input
has shape [5, 6]
and non-empty values:
[0, 1]: a
[0, 3]: b
[2, 0]: c
[3, 1]: d
Rows 1 and 4 are empty, so the output will be of shape [5, 6]
with values:
[0, 1]: a
[0, 3]: b
[1, 0]: default_value
[2, 0]: c
[3, 1]: d
[4, 0]: default_value
The output SparseTensor
will be in row-major order and will have the
same shape as the input.
This op also returns an indicator vector shaped [dense_shape[0]]
such that
empty_row_indicator[i] = True iff row i was an empty row.
And a reverse index map vector shaped [indices.shape[0]]
that is used during
backpropagation,
reverse_index_map[j] = out_j s.t. indices[j, :] == output_indices[out_j, :]
Arguments:
* scope: A Scope object
* indices: 2-D. the indices of the sparse tensor.
* values: 1-D. the values of the sparse tensor.
* dense_shape: 1-D. the shape of the sparse tensor.
* default_value: 0-D. default value to insert into location [row, 0, ..., 0]
for rows missing from the input sparse tensor.
output indices: 2-D. the indices of the filled sparse tensor.
Returns:
* Output
output_indices
* Output
output_values: 1-D. the values of the filled sparse tensor.
* Output
empty_row_indicator: 1-D. whether the dense row was missing in the
input sparse tensor.
* Output
reverse_index_map: 1-D. a map from the input indices to the output indices.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
SparseFillEmptyRows(Pointer p)
Pointer cast constructor.
|
SparseFillEmptyRows(Scope scope,
Input indices,
Input values,
Input dense_shape,
Input default_value) |
Modifier and Type | Method and Description |
---|---|
Output |
empty_row_indicator() |
SparseFillEmptyRows |
empty_row_indicator(Output setter) |
Operation |
operation() |
SparseFillEmptyRows |
operation(Operation setter) |
Output |
output_indices() |
SparseFillEmptyRows |
output_indices(Output setter) |
Output |
output_values() |
SparseFillEmptyRows |
output_values(Output setter) |
Output |
reverse_index_map() |
SparseFillEmptyRows |
reverse_index_map(Output setter) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public SparseFillEmptyRows(Pointer p)
Pointer(Pointer)
.public SparseFillEmptyRows operation(Operation setter)
public SparseFillEmptyRows output_indices(Output setter)
public SparseFillEmptyRows output_values(Output setter)
public SparseFillEmptyRows empty_row_indicator(Output setter)
public SparseFillEmptyRows reverse_index_map(Output setter)
Copyright © 2022. All rights reserved.