tensorflow :: ops :: FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>
float 유형의 '입력'텐서와 [d]
, 모양 중 하나를 가짜 양자화합니다.
요약
채널당 [b, d]
[b, h, w, d]
는 모양 [d]
의 min
및 max
를 inputs
과 동일한 모양의 텐서 '출력'으로 부동합니다.
[min; max]
는 inputs
데이터의 클램핑 범위를 정의합니다. inputs
값이 양자화 범위로 양자화된다 ( [0; 2^num_bits - 1]
때 narrow_range
거짓이고, [1; 2^num_bits - 1]
가 참일 경우) 양자화 드 출력 수레로서 다음과 [min; max]
간격. num_bits
는 양자화의 num_bits
입니다. 2에서 16 사이입니다.
양자화 전에 min
및 max
값은 다음 논리로 조정됩니다. min <= 0 <= max
를 갖는 것이 좋습니다. 0
이 값 범위에 있지 않으면 예기치 않은 동작이 발생할 수 있습니다. If 0 < min < max
: min_adj = 0
and 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
연산자 :: tensorflow :: 입력
operator::tensorflow::Input() const
연산자 :: tensorflow :: 출력
operator::tensorflow::Output() const
공개 정적 함수
좁은 범위
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )