blob: 57b471074c087caa924b898b3a98c1d2b5ac11fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "tensorflow/core/framework/op.h"
namespace tensorflow {
REGISTER_OP("StringToHashBucket")
.Input("string_tensor: string")
.Output("output: int64")
.Attr("num_buckets: int >= 1")
.Doc(R"doc(
Converts each string in the input Tensor to its hash mod by a number of buckets.
The hash function is deterministic on the content of the string within the
process.
Note that the hash function may change from time to time.
num_buckets: The number of buckets.
output: A Tensor of the same shape as the input string_tensor.
)doc");
} // namespace tensorflow
|