tensorflow :: ops :: FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>
偽-float型の '入力'テンソルと形状の1つを定量化します: [d]
、。
概要
[b, d]
[b, h, w, d]
チャネルごとに、形状[d]
min
およびmax
を、 inputs
と同じ形状の「出力」テンソルにフロートさせます。
[min; max]
inputs
データのクランプ範囲を定義します。 inputs
値は量子化範囲に量子化され( narrow_range
がfalseの場合は[0; 2^num_bits - 1]
、 narrow_range
場合は[1; 2^num_bits - 1]
)、量子化[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
値。
引数:
- スコープ:スコープオブジェクト
戻り値:
-
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 | |
outputs |
公の行事 | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
パブリック静的関数 | |
---|---|
NarrowRange (bool x) | |
NumBits (int64 x) |
構造体 | |
---|---|
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
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
パブリック静的関数
狭い範囲
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )