Spec-Zone.ru › TensorFlow C++ 1.15

tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel

#include <array_ops.h>

Ложно квантует тензор 'inputs' типа float и одной из форм: [d].

Summary

[b, d][b, h, w, d] по каналам с помощью плавающей точки 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 значения.

Arguments:

  • scope: Объект Scope

Returns:

  • Output: Тензор выходов.
Constructors and Destructors
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)
Public attributes
operation
Operation
outputs
::tensorflow::Output
Public functions
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Public static functions
NarrowRange(bool x)
Attrs
NumBits(int64 x)
Attrs
Structs
tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel::Attrs

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

Public attributes

operation

Operation operation

outputs

::tensorflow::Output outputs

Public functions

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 

Public static functions

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

Spec-Zone.ru

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