Spec-Zone.ru › TensorFlow C++ 2.3

tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel

#include <array_ops.h>

Фальшивая квантизация тензора 'inputs' типа float по каналам с плавающей точкой.

Краткое описание

Фальшивая квантизация тензора inputs типа float по каналам и одной из форм: [d], [b, d][b, h, w, d] с помощью плавающих чисел по каналам min и max формы [d] до тензора outputs той же формы, что и inputs.

Атрибуты

  • [min; max] определяют диапазон ограничения для данных inputs.
  • inputs значения квантуются в диапазон квантования ([0; 2^num_bits - 1] когда narrow_range равно false и [1; 2^num_bits - 1] когда оно равно true) и затем деквантуются и выводятся как числа с плавающей точкой в диапазоне [min; max].
  • num_bits — это разрядность квантования; значения от 2 до 16 включительно.

Перед квантованием значения min и max корректируются с помощью следующего алгоритма. Рекомендуется использовать min <= 0 <= max. Если значения 0 выходят за пределы диапазона, поведение может быть непредсказуемым:

  • Если 0 < min < max: min_adj = 0 и max_adj = max - min.
  • Если min < max < 0: min_adj = min - max и max_adj = 0.
  • Если min <= 0 <= max: scale = (max - min) / (2^num_bits - 1), min_adj = scale * round(min / scale) и max_adj = max + min_adj - min.

Эта операция имеет градиент и, следовательно, позволяет обучать значения min и max.

Аргументы:

  • scope: Объект Scope

Возвращаемое значение:

  • Output: тензор вывода.
Конструкторы и деструкторы
FakeQuantWithMinMaxVarsPerChannel(const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max)
FakeQuantWithMinMaxVarsPerChannel(const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVarsPerChannel::Attrs & attrs)
Публичные атрибуты
operation
Operation
outputs
::tensorflow::Output
Публичные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Публичные статические функции
NarrowRange(bool x)
Attrs
NumBits(int64 x)
Attrs
Структуры
tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel::Attrs

Дополнительные параметры для FakeQuantWithMinMaxVarsPerChannel.

Публичные атрибуты

operation

Operation operation

outputs

::tensorflow::Output outputs

Публичные функции

FakeQuantWithMinMaxVarsPerChannel

 FakeQuantWithMinMaxVarsPerChannel(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input min,
  ::tensorflow::Input max
)

FakeQuantWithMinMaxVarsPerChannel

 FakeQuantWithMinMaxVarsPerChannel(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input min,
  ::tensorflow::Input max,
  const FakeQuantWithMinMaxVarsPerChannel::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Публичные статические функции

NarrowRange

Attrs NarrowRange(
  bool x
)

NumBits

Attrs NumBits(
  int64 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/fake-quant-with-min-max-vars-per-channel

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API