@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class QuantizeAndDequantizeV2 extends Pointer
range_given == True
, this specifies the minimum input value that needs to
be represented, otherwise it is determined from the min value of the input
tensor.
* input_max: If range_given == True
, this specifies the maximum input value that needs to
be represented, otherwise it is determined from the max value of the input
tensor.
Optional attributes (see Attrs
):
* signed_input: Whether the quantization is signed or unsigned. (actually this parameter should
have been called signed_output
)
* num_bits: The bitwidth of the quantization.
* range_given: Whether the range is given or should be determined from the input
tensor.
* round_mode: The 'round_mode' attribute controls which rounding tie-breaking algorithm is
used when rounding float values to their quantized equivalents. The following
rounding modes are currently supported:
* HALF_TO_EVEN: this is the default round_mode.
* HALF_UP: round towards positive. In this mode 7.5 rounds up to 8 and -7.5
rounds up to -7.
* narrow_range: If True, then the absolute value of the quantized minimum value is the same as
the quantized maximum value, instead of 1 greater.
i.e. for 8 bit quantization, the minimum value is -127 instead of -128.
Returns:
* Output
: The output tensor.Modifier and Type | Class and Description |
---|---|
static class |
QuantizeAndDequantizeV2.Attrs
Optional attribute setters for QuantizeAndDequantizeV2
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
QuantizeAndDequantizeV2(Pointer p)
Pointer cast constructor.
|
QuantizeAndDequantizeV2(Scope scope,
Input input,
Input input_min,
Input input_max) |
QuantizeAndDequantizeV2(Scope scope,
Input input,
Input input_min,
Input input_max,
QuantizeAndDequantizeV2.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
static QuantizeAndDequantizeV2.Attrs |
NarrowRange(boolean x) |
Node |
node() |
static QuantizeAndDequantizeV2.Attrs |
NumBits(long x) |
Operation |
operation() |
QuantizeAndDequantizeV2 |
operation(Operation setter) |
Output |
output() |
QuantizeAndDequantizeV2 |
output(Output setter) |
static QuantizeAndDequantizeV2.Attrs |
RangeGiven(boolean x) |
static QuantizeAndDequantizeV2.Attrs |
RoundMode(BytePointer x) |
static QuantizeAndDequantizeV2.Attrs |
RoundMode(String x) |
static QuantizeAndDequantizeV2.Attrs |
SignedInput(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 QuantizeAndDequantizeV2(Pointer p)
Pointer(Pointer)
.public QuantizeAndDequantizeV2(@Const @ByRef Scope scope, @ByVal Input input, @ByVal Input input_min, @ByVal Input input_max)
public Node node()
@ByVal public static QuantizeAndDequantizeV2.Attrs SignedInput(@Cast(value="bool") boolean x)
@ByVal public static QuantizeAndDequantizeV2.Attrs NumBits(@Cast(value="tensorflow::int64") long x)
@ByVal public static QuantizeAndDequantizeV2.Attrs RangeGiven(@Cast(value="bool") boolean x)
@ByVal public static QuantizeAndDequantizeV2.Attrs RoundMode(@tensorflow.StringPiece BytePointer x)
@ByVal public static QuantizeAndDequantizeV2.Attrs RoundMode(@tensorflow.StringPiece String x)
@ByVal public static QuantizeAndDequantizeV2.Attrs NarrowRange(@Cast(value="bool") boolean x)
public QuantizeAndDequantizeV2 operation(Operation setter)
public QuantizeAndDequantizeV2 output(Output setter)
Copyright © 2022. All rights reserved.