텐서플로우:: ops:: ComputeAccidentalHits
#include <candidate_sampling_ops.h>sampled_candidates에서 true_labels와 일치하는 위치의 ID를 계산합니다.
요약
로그 오즈 NCE를 수행할 때, 이 연산의 결과는 SparseToDense 연산을 거친 후 샘플링된 후보들의 로짓에 더해져야 합니다. 이렇게 하면 분류기가 샘플링된 레이블임을 확실히 인식하게 되어 실제 레이블과 일치하는 샘플링된 레이블을 '제거'하는 효과를 얻을 수 있습니다.
논거:
- 범위: Scope 객체
- true_classes: UnpackSparseLabels의 true_classes 출력값입니다.
- sampled_candidates: CandidateSampler의 sampled_candidates 출력입니다.
- num_true: 컨텍스트별 참 레이블의 개수입니다.
선택적 속성( Attrs 참조):
- seed: seed 또는 seed2 중 하나라도 0이 아닌 값으로 설정되면, 지정된 시드를 사용하여 난수 생성기를 초기화합니다. 그렇지 않으면 임의의 시드를 사용합니다.
- seed2: 시드 충돌을 방지하기 위한 두 번째 시드입니다.
보고:
-
Output인덱스: true_candidates의 행에 해당하는 인덱스 벡터입니다. -
Outputids: indices의 해당 인덱스를 가진 행의 true_label과 일치하는 sampled_candidates 내 위치의 ID 벡터입니다. -
Output가중치: 인덱스 및 ID와 길이가 같은 벡터이며, 각 요소는 -FLOAT_MAX입니다.
생성자와 소멸자 | |
|---|---|
ComputeAccidentalHits (const :: tensorflow::Scope & scope, :: tensorflow::Input true_classes, :: tensorflow::Input sampled_candidates, int64 num_true) | |
ComputeAccidentalHits (const :: tensorflow::Scope & scope, :: tensorflow::Input true_classes, :: tensorflow::Input sampled_candidates, int64 num_true, const ComputeAccidentalHits::Attrs & attrs) |
공개 속성 | |
|---|---|
ids | |
indices | |
operation | |
weights | |
공개 정적 함수 | |
|---|---|
Seed (int64 x) | |
Seed2 (int64 x) | |
구조 | |
|---|---|
| 텐서플로우:: ops:: ComputeAccidentalHits:: Attrs | ComputeAccidentalHits 에 대한 선택적 속성 설정기입니다. |
공개 속성
아이즈
::tensorflow::Output ids
지수
::tensorflow::Output indices
작업
Operation operation
무게
::tensorflow::Output weights
공공 기능
우발적 히트 계산
ComputeAccidentalHits( const ::tensorflow::Scope & scope, ::tensorflow::Input true_classes, ::tensorflow::Input sampled_candidates, int64 num_true )
우발적 히트 계산
ComputeAccidentalHits( const ::tensorflow::Scope & scope, ::tensorflow::Input true_classes, ::tensorflow::Input sampled_candidates, int64 num_true, const ComputeAccidentalHits::Attrs & attrs )
공개 정적 함수
씨앗
Attrs Seed( int64 x )
시드2
Attrs Seed2( int64 x )