Spec-Zone.ru › TensorFlow C++ 2.4

tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel

#include <array_ops.h>

Фейк-квантует тензор 'inputs' типа float по каналам.

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

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

Атрибуты

  • [min; max] определяют диапазон ограничения данных inputs.
  • Значения inputs квантуются в диапазон квантования ([0; 2^num_bits - 1] когда narrow_range ложно и [1; 2^num_bits - 1] когда истинно), а затем деквантуются и выводятся как числа с плавающей точкой в диапазоне [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 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/cc/class/tensorflow/ops/fake-quant-with-min-max-vars-per-channel

Spec-Zone.ru

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