Spec-Zone.ru › TensorFlow C++ 1.15

tensorflow::ops::ComputeAccidentalHits

#include <candidate_sampling_ops.h>

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

Summary

При использовании 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 для предотвращения столкновений.

Возвращает:

  • 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 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/compute-accidental-hits

Spec-Zone.ru

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