!19381 [bugfix]random sample op output is wrong

Merge pull request !19381 from zyli2020/bug_fix_ps_cache
This commit is contained in:
i-robot 2021-07-05 13:25:49 +00:00 committed by Gitee
commit c8b703c658
1 changed files with 4 additions and 0 deletions

View File

@ -119,6 +119,10 @@ class UniformCandidateSamplerGpuKernel : public GpuKernel {
if (init_seed_ == 0 && cur_seed_ != 0) {
cur_seed_ = 0;
}
if (init_seed_ != 0) {
generator_.seed(init_seed_);
}
}
protected: