tensorflow :: ops :: FakeQuantWithMinMaxVars
#include <array_ops.h>
グローバルfloatスカラーmin
介してfloat型の「入力」テンソルを偽量子化する
概要
そして、 max
から 'outputs'への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
:出力テンソル。
コンストラクタとデストラクタ | |
---|---|
FakeQuantWithMinMaxVars (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max) | |
FakeQuantWithMinMaxVars (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max, const FakeQuantWithMinMaxVars::Attrs & attrs) |
パブリック属性 | |
---|---|
operation | |
outputs |
公の行事 | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
パブリック静的関数 | |
---|---|
NarrowRange (bool x) | |
NumBits (int64 x) |
構造体 | |
---|---|
tensorflow :: ops :: FakeQuantWithMinMaxVars :: Attrs | FakeQuantWithMinMaxVarsのオプションの属性セッター。 |
パブリック属性
操作
Operation operation
出力
::tensorflow::Output outputs
公の行事
FakeQuantWithMinMaxVars
FakeQuantWithMinMaxVars( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max )
FakeQuantWithMinMaxVars
FakeQuantWithMinMaxVars( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVars::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 )