@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class Squeeze extends Pointer
input
, this operation returns a tensor of the same type with
all dimensions of size 1 removed. If you don't want to remove all size 1
dimensions, you can remove specific size 1 dimensions by specifying
axis
.
For example:
# 't' is a tensor of shape [1, 2, 1, 3, 1, 1]
shape(squeeze(t)) ==> [2, 3]
Or, to remove specific size 1 dimensions:
# 't' is a tensor of shape [1, 2, 1, 3, 1, 1]
shape(squeeze(t, [2, 4])) ==> [1, 2, 3, 1]
Arguments:
* scope: A Scope object
* input: The input
to squeeze.
Optional attributes (see Attrs
):
* axis: If specified, only squeezes the dimensions listed. The dimension
index starts at 0. It is an error to squeeze a dimension that is not 1. Must
be in the range [-rank(input), rank(input))
.
Returns:
* Output
: Contains the same data as input
, but has one or more dimensions of
size 1 removed.Modifier and Type | Class and Description |
---|---|
static class |
Squeeze.Attrs
Optional attribute setters for Squeeze
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Squeeze(Pointer p)
Pointer cast constructor.
|
Squeeze(Scope scope,
Input input) |
Squeeze(Scope scope,
Input input,
Squeeze.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
static Squeeze.Attrs |
Axis(int... x) |
static Squeeze.Attrs |
Axis(IntBuffer x) |
static Squeeze.Attrs |
Axis(IntPointer x) |
Node |
node() |
Operation |
operation() |
Squeeze |
operation(Operation setter) |
Output |
output() |
Squeeze |
output(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 Squeeze(Pointer p)
Pointer(Pointer)
.public Node node()
@ByVal public static Squeeze.Attrs Axis(@tensorflow.ArraySlice IntPointer x)
@ByVal public static Squeeze.Attrs Axis(@tensorflow.ArraySlice IntBuffer x)
@ByVal public static Squeeze.Attrs Axis(@tensorflow.ArraySlice int... x)
Copyright © 2022. All rights reserved.