tensorflow :: ops :: FakeQuantWithMinMaxArgs
#include <array_ops.h>
偽-同じタイプの「入力」テンソルを「入力」テンソルに量子化し、「出力」テンソルに「float」と入力します。
概要
属性[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
。
出力がまだ浮動小数点にあるため、量子化は偽物と呼ばれます。
引数:
- スコープ:スコープオブジェクト
戻り値:
-
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
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
パブリック静的関数
マックス
Attrs Max( float x )
最小
Attrs Min( float x )
狭い範囲
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )