Spec-Zone.ru › TensorFlow C++ 2.4

tensorflow::ops::ComputeAccidentalHits

#include <candidate_sampling_ops.h>

Вычисляет идентификаторы позиций в sampled_candidates, которые совпадают с true_labels.

Краткое описание

При использовании log-odds NCE результат этого оператора должен быть передан через оператор SparseToDense, а затем добавлен к логарифмам сэмплированных кандидатов. Это имеет эффект «удаления» сэмплированных меток, которые совпадают с истинными метками, заставляя классификатор убедиться, что это сэмплированные метки.

Аргументы:

  • scope: Объект Scope
  • true_classes: Выход true_classes оператора UnpackSparseLabels.
  • sampled_candidates: Выход sampled_candidates оператора CandidateSampler.
  • num_true: Количество истинных меток на контекст.

Необязательные атрибуты (см. Attrs):

  • seed: Если seed или seed2 установлены в ненулевое значение, генератор случайных чисел инициализируется заданным seed. В противном случае он инициализируется случайным seed.
  • seed2: Второй seed для предотвращения коллизий seed.

Возвращает:

  • Output indices: Вектор индексов, соответствующих строкам true_candidates.
  • Output ids: Вектор идентификаторов позиций в sampled_candidates, которые совпадают с true_label для строки с соответствующим индексом в indices.
  • Output weights: Вектор такой же длины, как indices и ids, в котором каждый элемент равен -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
::tensorflow::Output
indices
::tensorflow::Output
operation
Operation
weights
::tensorflow::Output
Общественные статические функции
Seed(int64 x)
Attrs
Seed2(int64 x)
Attrs
Структуры
tensorflow::ops::ComputeAccidentalHits::Attrs

Необязательные установки атрибутов для ComputeAccidentalHits.

Общественные атрибуты

ids

::tensorflow::Output ids

indices

::tensorflow::Output indices

operation

Operation operation

weights

::tensorflow::Output weights

Общественные функции

ComputeAccidentalHits

 ComputeAccidentalHits(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input true_classes,
  ::tensorflow::Input sampled_candidates,
  int64 num_true
)

ComputeAccidentalHits

 ComputeAccidentalHits(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input true_classes,
  ::tensorflow::Input sampled_candidates,
  int64 num_true,
  const ComputeAccidentalHits::Attrs & attrs
)

Общественные статические функции

Seed

Attrs Seed(
  int64 x
)

Seed2

Attrs Seed2(
  int64 x
)

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/cc/class/tensorflow/ops/compute-accidental-hits

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API