@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class ExtractGlimpse extends Pointer
offsets
from the input tensor. If the windows only partially
overlaps the inputs, the non overlapping areas will be filled with
random noise.
The result is a 4-D tensor of shape [batch_size, glimpse_height,
glimpse_width, channels]
. The channels and batch dimensions are the
same as that of the input tensor. The height and width of the output
windows are specified in the size
parameter.
The argument normalized
and centered
controls how the windows are built:
* If the coordinates are normalized but not centered, 0.0 and 1.0
correspond to the minimum and maximum of each height and width
dimension.
* If the coordinates are both normalized and centered, they range from
-1.0 to 1.0. The coordinates (-1.0, -1.0) correspond to the upper
left corner, the lower right corner is located at (1.0, 1.0) and the
center is at (0, 0).
* If the coordinates are not normalized they are interpreted as
numbers of pixels.
Arguments:
* scope: A Scope object
* input: A 4-D float tensor of shape [batch_size, height, width, channels]
.
* size: A 1-D tensor of 2 elements containing the size of the glimpses
to extract. The glimpse height must be specified first, following
by the glimpse width.
* offsets: A 2-D integer tensor of shape [batch_size, 2]
containing
the y, x locations of the center of each window.
Optional attributes (see Attrs
):
* centered: indicates if the offset coordinates are centered relative to
the image, in which case the (0, 0) offset is relative to the center
of the input images. If false, the (0,0) offset corresponds to the
upper left corner of the input images.
* normalized: indicates if the offset coordinates are normalized.
* uniform_noise: indicates if the noise should be generated using a
uniform distribution or a Gaussian distribution.
* noise: indicates if the noise should uniform
, gaussian
, or
zero
. The default is uniform
which means the the noise type
will be decided by uniform_noise
.
Returns:
* Output
: A tensor representing the glimpses [batch_size,
glimpse_height, glimpse_width, channels]
.Modifier and Type | Class and Description |
---|---|
static class |
ExtractGlimpse.Attrs
Optional attribute setters for ExtractGlimpse
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
ExtractGlimpse(Pointer p)
Pointer cast constructor.
|
ExtractGlimpse(Scope scope,
Input input,
Input size,
Input offsets) |
ExtractGlimpse(Scope scope,
Input input,
Input size,
Input offsets,
ExtractGlimpse.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
static ExtractGlimpse.Attrs |
Centered(boolean x) |
Output |
glimpse() |
ExtractGlimpse |
glimpse(Output setter) |
Node |
node() |
static ExtractGlimpse.Attrs |
Noise(BytePointer x) |
static ExtractGlimpse.Attrs |
Noise(String x) |
static ExtractGlimpse.Attrs |
Normalized(boolean x) |
Operation |
operation() |
ExtractGlimpse |
operation(Operation setter) |
static ExtractGlimpse.Attrs |
UniformNoise(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 ExtractGlimpse(Pointer p)
Pointer(Pointer)
.public ExtractGlimpse(@Const @ByRef Scope scope, @ByVal Input input, @ByVal Input size, @ByVal Input offsets)
public Node node()
@ByVal public static ExtractGlimpse.Attrs Centered(@Cast(value="bool") boolean x)
@ByVal public static ExtractGlimpse.Attrs Normalized(@Cast(value="bool") boolean x)
@ByVal public static ExtractGlimpse.Attrs UniformNoise(@Cast(value="bool") boolean x)
@ByVal public static ExtractGlimpse.Attrs Noise(@tensorflow.StringPiece BytePointer x)
@ByVal public static ExtractGlimpse.Attrs Noise(@tensorflow.StringPiece String x)
public ExtractGlimpse operation(Operation setter)
public ExtractGlimpse glimpse(Output setter)
Copyright © 2022. All rights reserved.