テンソルフロー::作戦:: FakeQuantWithMinMaxArgs
#include <array_ops.h>「入力」テンソルを疑似量子化し、同じ型の「出力」テンソルに float 型を入力します。
まとめ
属性[min; max] inputsデータのクランプ範囲を定義します。 inputs値は量子化範囲 ( narrow_rangeが false の場合は[0; 2^num_bits - 1] 、true の場合は[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 。
出力が浮動小数点のままであるため、量子化はフェイクと呼ばれます。
引数:
- スコープ:スコープオブジェクト
戻り値:
-
Output: 出力テンソル。
コンストラクターとデストラクター | |
|---|---|
FakeQuantWithMinMaxArgs (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs) | |
FakeQuantWithMinMaxArgs (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, const FakeQuantWithMinMaxArgs::Attrs & attrs) |
パブリック属性 | |
|---|---|
operation | |
outputs | |
公共機能 | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
パブリック静的関数 | |
|---|---|
Max (float x) | |
Min (float x) | |
NarrowRange (bool x) | |
NumBits (int64 x) | |
構造体 | |
|---|---|
| tensorflow:: ops:: FakeQuantWithMinMaxArgs:: Attrs | FakeQuantWithMinMaxArgsのオプションの属性セッター。 |
パブリック属性
手術
Operation operation
出力
::tensorflow::Output outputs
公共機能
FakeQuantWithMinMaxArgs
FakeQuantWithMinMaxArgs( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs )
FakeQuantWithMinMaxArgs
FakeQuantWithMinMaxArgs( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, const FakeQuantWithMinMaxArgs::Attrs & attrs )
ノード
::tensorflow::Node * node() const
演算子::tensorflow::入力
operator::tensorflow::Input() const
演算子::tensorflow::出力
operator::tensorflow::Output() const
パブリック静的関数
マックス
Attrs Max( float x )
分
Attrs Min( float x )
狭い範囲
Attrs NarrowRange( bool x )
ビット数
Attrs NumBits( int64 x )