#include <image_ops.h>
Extracts a glimpse from the input tensor.
Returns a set of windows called glimpses extracted at location 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:
Arguments:
[batch_size, height, width, channels]
.[batch_size, 2]
containing the y, x locations of the center of each window.Optional attributes (see Attrs
):
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]
. Constructors and Destructors | |
---|---|
ExtractGlimpse(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input size, ::tensorflow::Input offsets) | |
ExtractGlimpse(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input size, ::tensorflow::Input offsets, const ExtractGlimpse::Attrs & attrs) |
Public attributes | |
---|---|
glimpse | |
operation |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
Public static functions | |
---|---|
Centered(bool x) | |
Noise(StringPiece x) | |
Normalized(bool x) | |
UniformNoise(bool x) |
Structs | |
---|---|
tensorflow::ops::ExtractGlimpse::Attrs | Optional attribute setters for ExtractGlimpse. |
::tensorflow::Output glimpse
Operation operation
ExtractGlimpse( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input size, ::tensorflow::Input offsets )
ExtractGlimpse( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input size, ::tensorflow::Input offsets, const ExtractGlimpse::Attrs & attrs )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Attrs Centered( bool x )
Attrs Noise( StringPiece x )
Attrs Normalized( bool x )
Attrs UniformNoise( bool x )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/extract-glimpse