提交 7b7d0d0c 编写于 作者: M minqiyang

Change hash function back

test=develop
上级 59799537
...@@ -45,7 +45,7 @@ class HashKerel : public framework::OpKernel<T> { ...@@ -45,7 +45,7 @@ class HashKerel : public framework::OpKernel<T> {
for (int idx = 0; idx < seq_length; ++idx) { for (int idx = 0; idx < seq_length; ++idx) {
for (int ihash = 0; ihash != num_hash; ++ihash) { for (int ihash = 0; ihash != num_hash; ++ihash) {
output[idx * num_hash + ihash] = output[idx * num_hash + ihash] =
XXH32(input, sizeof(int) * last_dim, ihash) % mod_by; XXH64(input, sizeof(int) * last_dim, ihash) % mod_by;
} }
input += last_dim; input += last_dim;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册