tensorflow:: ops:: StringToHashBucketFast

#include <string_ops.h>

Konwertuje każdy ciąg w tensorze wejściowym na jego mod haszujący według określonej liczby kontenerów.

Streszczenie

The hash function is deterministic on the content of the string within the process and will never change. However, it is not suitable for cryptography. This function may be used when CPU time is scarce and inputs are trusted or unimportant. There is a risk of adversaries constructing inputs that all hash to the same bucket. To prevent this problem, use a strong hash function with tf.string_to_hash_bucket_strong .

Przykłady:

tf.strings.to_hash_bucket_fast(["Witaj", "TensorFlow", "2.x"], 3).numpy() array([0, 2, 2])

Argumenty:

  • zakres: Obiekt zakresu
  • dane wejściowe: ciągi znaków służące do przypisania kontenera haszującego.
  • num_buckets: Liczba kontenerów.

Zwroty:

  • Output : Tensor o tym samym kształcie co wejściowy string_tensor .

Konstruktory i destruktory

StringToHashBucketFast (const :: tensorflow::Scope & scope, :: tensorflow::Input input, int64 num_buckets)

Atrybuty publiczne

operation
output

Funkcje publiczne

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

Atrybuty publiczne

działanie

Operation operation

wyjście

::tensorflow::Output output

Funkcje publiczne

StringToHashBucketFast

 StringToHashBucketFast(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  int64 num_buckets
)

węzeł

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const