텐서플로우:: ops:: 채널당 최소/최대 변수가 포함된 가짜 수량
#include <array_ops.h>채널별 부동소수점을 사용하여 float 타입의 '입력' 텐서를 가짜 양자화합니다.
요약
채널별 float 타입의 inputs 텐서와 [d] , [b, d] [d] [b, h, w, d] 중 하나의 형태를 채널별 float 형태의 min 과 max 를 통해 가짜 양자화하여 inputs 과 동일한 형태의 outputs 텐서를 생성합니다.
속성
-
[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.
이 연산은 기울기를 가지므로 min 과 max 값을 학습할 수 있습니다.
논거:
- 범위: Scope 객체
보고:
-
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) | |
구조 | |
|---|---|
| 텐서플로우:: ops:: FakeQuantWithMinMaxVarsPerChannel:: Attrs | FakeQuantWithMinMaxVarsPerChannel 에 대한 선택적 속성 설정기입니다. |
공개 속성
작업
Operation operation
출력
::tensorflow::Output outputs
공공 기능
채널당 최소/최대 변수를 사용하는 가짜 수량
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 )
마디
::tensorflow::Node * node() const
연산자::텐서플로우::입력
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
내로우 레인지
Attrs NarrowRange( bool x )
넘비트
Attrs NumBits( int64 x )