@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class SparseToDense extends Pointer
dense
with shape output_shape
such that
# If sparse_indices is scalar
dense[i] = (i == sparse_indices ? sparse_values : default_value)
# If sparse_indices is a vector, then for each i
dense[sparse_indices[i]] = sparse_values[i]
# If sparse_indices is an n by d matrix, then for each i in [0, n)
dense[sparse_indices[i][0], ..., sparse_indices[i][d-1]] = sparse_values[i]
All other values in dense
are set to default_value
. If sparse_values
is a
scalar, all sparse indices are set to this single value.
Indices should be sorted in lexicographic order, and indices must not
contain any repeats. If validate_indices
is true, these properties
are checked during execution.
Arguments:
* scope: A Scope object
* sparse_indices: 0-D, 1-D, or 2-D. sparse_indices[i]
contains the complete
index where sparse_values[i]
will be placed.
* output_shape: 1-D. Shape of the dense output tensor.
* sparse_values: 1-D. Values corresponding to each row of sparse_indices
,
or a scalar value to be used for all sparse indices.
* default_value: Scalar value to set for indices not specified in
sparse_indices
.
Optional attributes (see Attrs
):
* validate_indices: If true, indices are checked to make sure they are sorted in
lexicographic order and that there are no repeats.
Returns:
* Output
: Dense output tensor of shape output_shape
.Modifier and Type | Class and Description |
---|---|
static class |
SparseToDense.Attrs
Optional attribute setters for SparseToDense
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
SparseToDense(Pointer p)
Pointer cast constructor.
|
SparseToDense(Scope scope,
Input sparse_indices,
Input output_shape,
Input sparse_values,
Input default_value) |
SparseToDense(Scope scope,
Input sparse_indices,
Input output_shape,
Input sparse_values,
Input default_value,
SparseToDense.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Output |
dense() |
SparseToDense |
dense(Output setter) |
Node |
node() |
Operation |
operation() |
SparseToDense |
operation(Operation setter) |
static SparseToDense.Attrs |
ValidateIndices(boolean x) |
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 SparseToDense(Pointer p)
Pointer(Pointer)
.public SparseToDense(@Const @ByRef Scope scope, @ByVal Input sparse_indices, @ByVal Input output_shape, @ByVal Input sparse_values, @ByVal Input default_value)
public Node node()
@ByVal public static SparseToDense.Attrs ValidateIndices(@Cast(value="bool") boolean x)
public SparseToDense operation(Operation setter)
public SparseToDense dense(Output setter)
Copyright © 2022. All rights reserved.