Spec-Zone.ru › TensorFlow C++ 2.9

tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel

#include <array_ops.h>

Ложно квантует тензор 'inputs' типа float с использованием значений 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

выводы

::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
)

узел

::tensorflow::Node * node() const 

оператор::tensorflow::Input

operator::tensorflow::Input() const 

оператор::tensorflow::Output

operator::tensorflow::Output() const 

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

Узкий диапазон

Attrs NarrowRange(
  bool x
)

Количество бит

Attrs NumBits(
  int64 x
)

© 2022 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.9/api_docs/cc/class/tensorflow/ops/fake-quant-with-min-max-vars-per-channel

Spec-Zone.ru

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