@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class FakeQuantWithMinMaxVarsPerChannel extends Pointer
[d]
,
[b, d]
[b, h, w, d]
via per-channel floats min
and max
of shape [d]
to 'outputs' tensor of same shape as inputs
.
[min; max]
define the clamping range for the inputs
data.
inputs
values are quantized into the quantization range ([0; 2^num_bits - 1]
when narrow_range
is false and [1; 2^num_bits - 1]
when it is true) and
then de-quantized and output as floats in [min; max]
interval.
num_bits
is the bitwidth of the quantization; between 2 and 16, inclusive.
Before quantization, min
and max
values are adjusted with the following
logic.
It is suggested to have min <= 0 <= max
. If 0
is not in the range of values,
the behavior can be unexpected:
If 0 < min < max
: min_adj = 0
and max_adj = max - min
.
If min < max < 0
: min_adj = min - max
and max_adj = 0
.
If min <= 0 <= max
: scale = (max - min) / (2^num_bits - 1)
,
min_adj = scale * round(min / scale)
and max_adj = max + min_adj - min
.
This operation has a gradient and thus allows for training min
and max
values.
Arguments:
* scope: A Scope object
Returns:
* Output
: The outputs tensor.Modifier and Type | Class and Description |
---|---|
static class |
FakeQuantWithMinMaxVarsPerChannel.Attrs
Optional attribute setters for FakeQuantWithMinMaxVarsPerChannel
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
FakeQuantWithMinMaxVarsPerChannel(Pointer p)
Pointer cast constructor.
|
FakeQuantWithMinMaxVarsPerChannel(Scope scope,
Input inputs,
Input min,
Input max) |
FakeQuantWithMinMaxVarsPerChannel(Scope scope,
Input inputs,
Input min,
Input max,
FakeQuantWithMinMaxVarsPerChannel.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
static FakeQuantWithMinMaxVarsPerChannel.Attrs |
NarrowRange(boolean x) |
Node |
node() |
static FakeQuantWithMinMaxVarsPerChannel.Attrs |
NumBits(long x) |
Operation |
operation() |
FakeQuantWithMinMaxVarsPerChannel |
operation(Operation setter) |
Output |
outputs() |
FakeQuantWithMinMaxVarsPerChannel |
outputs(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 FakeQuantWithMinMaxVarsPerChannel(Pointer p)
Pointer(Pointer)
.public FakeQuantWithMinMaxVarsPerChannel(@Const @ByRef Scope scope, @ByVal Input inputs, @ByVal Input min, @ByVal Input max)
public Node node()
@ByVal public static FakeQuantWithMinMaxVarsPerChannel.Attrs NumBits(@Cast(value="tensorflow::int64") long x)
@ByVal public static FakeQuantWithMinMaxVarsPerChannel.Attrs NarrowRange(@Cast(value="bool") boolean x)
public FakeQuantWithMinMaxVarsPerChannel operation(Operation setter)
public FakeQuantWithMinMaxVarsPerChannel outputs(Output setter)
Copyright © 2022. All rights reserved.