Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 238725068
This commit is contained in:
parent
4f086f4c0f
commit
623e667121
@ -126,6 +126,15 @@ func FakeQuantWithMinMaxVarsPerChannelNarrowRange(value bool) FakeQuantWithMinMa
|
|||||||
// then de-quantized and output as floats in `[min; max]` interval.
|
// then de-quantized and output as floats in `[min; max]` interval.
|
||||||
// `num_bits` is the bitwidth of the quantization; between 2 and 16, inclusive.
|
// `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`
|
// This operation has a gradient and thus allows for training `min` and `max`
|
||||||
// values.
|
// values.
|
||||||
func FakeQuantWithMinMaxVarsPerChannel(scope *Scope, inputs tf.Output, min tf.Output, max tf.Output, optional ...FakeQuantWithMinMaxVarsPerChannelAttr) (outputs tf.Output) {
|
func FakeQuantWithMinMaxVarsPerChannel(scope *Scope, inputs tf.Output, min tf.Output, max tf.Output, optional ...FakeQuantWithMinMaxVarsPerChannelAttr) (outputs tf.Output) {
|
||||||
@ -307,6 +316,15 @@ func FakeQuantWithMinMaxArgsNarrowRange(value bool) FakeQuantWithMinMaxArgsAttr
|
|||||||
// then de-quantized and output as floats in `[min; max]` interval.
|
// then de-quantized and output as floats in `[min; max]` interval.
|
||||||
// `num_bits` is the bitwidth of the quantization; between 2 and 16, inclusive.
|
// `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`.
|
||||||
|
//
|
||||||
// Quantization is called fake since the output is still in floating point.
|
// Quantization is called fake since the output is still in floating point.
|
||||||
func FakeQuantWithMinMaxArgs(scope *Scope, inputs tf.Output, optional ...FakeQuantWithMinMaxArgsAttr) (outputs tf.Output) {
|
func FakeQuantWithMinMaxArgs(scope *Scope, inputs tf.Output, optional ...FakeQuantWithMinMaxArgsAttr) (outputs tf.Output) {
|
||||||
if scope.Err() != nil {
|
if scope.Err() != nil {
|
||||||
@ -20642,6 +20660,15 @@ func FakeQuantWithMinMaxVarsNarrowRange(value bool) FakeQuantWithMinMaxVarsAttr
|
|||||||
// then de-quantized and output as floats in `[min; max]` interval.
|
// then de-quantized and output as floats in `[min; max]` interval.
|
||||||
// `num_bits` is the bitwidth of the quantization; between 2 and 16, inclusive.
|
// `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`
|
// This operation has a gradient and thus allows for training `min` and `max`
|
||||||
// values.
|
// values.
|
||||||
func FakeQuantWithMinMaxVars(scope *Scope, inputs tf.Output, min tf.Output, max tf.Output, optional ...FakeQuantWithMinMaxVarsAttr) (outputs tf.Output) {
|
func FakeQuantWithMinMaxVars(scope *Scope, inputs tf.Output, min tf.Output, max tf.Output, optional ...FakeQuantWithMinMaxVarsAttr) (outputs tf.Output) {
|
||||||
|
Loading…
Reference in New Issue
Block a user