텐서플로:: 작전:: ComputeAcidentalHits
#include <candidate_sampling_ops.h>
true_labels와 일치하는 sampled_candidates의 위치 ID를 계산합니다.
요약
log-odds NCE를 수행할 때 이 연산의 결과는 SparseToDense 연산을 통해 전달된 다음 샘플링된 후보의 로짓에 추가되어야 합니다. 이것은 분류자가 샘플링된 레이블임을 확인함으로써 실제 레이블과 일치하는 샘플링된 레이블을 '제거'하는 효과가 있습니다.
인수:
- 범위: 범위 개체
- true_classes: UnpackSparseLabels의 true_classes 출력.
- sampled_candidates: CandidateSampler의 sampled_candidates 출력입니다.
- num_true: 컨텍스트당 실제 레이블 수입니다.
선택적 속성( Attrs
참조):
- seed: seed 또는 seed2 중 하나가 0이 아닌 값으로 설정되면 난수 생성기가 주어진 시드에 의해 시드됩니다. 그렇지 않으면 임의의 시드로 시드됩니다.
- seed2: 시드 충돌을 피하기 위한 두 번째 시드입니다.
보고:
-
Output
인덱스: true_candidates의 행에 해당하는 인덱스 벡터. -
Output
ID: 인덱스의 해당 인덱스가 있는 행의 true_label과 일치하는 sampled_candidates의 위치 ID 벡터. -
Output
가중치: 각 요소가 -FLOAT_MAX인 인덱스 및 ID와 동일한 길이의 벡터입니다.
생성자와 소멸자 | |
---|---|
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) |
구조체 | |
---|---|
tensorflow:: ops:: ComputeAccidentalHits:: 속성 | ComputeAccidentalHits 에 대한 선택적 속성 설정자 . |
공개 속성
아이디
::tensorflow::Output ids
지수
::tensorflow::Output indices
작업
Operation operation
무게
::tensorflow::Output weights
공공 기능
ComputeAcidentalHits
ComputeAccidentalHits( const ::tensorflow::Scope & scope, ::tensorflow::Input true_classes, ::tensorflow::Input sampled_candidates, int64 num_true )
ComputeAcidentalHits
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 )