We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c63fef commit b30bddeCopy full SHA for b30bdde
paddle/fluid/operators/sampling_id_op.h
@@ -72,11 +72,11 @@ class SamplingIdKernel : public framework::OpKernel<T> {
72
// Standard mersenne_twister_engine seeded with rd()
73
std::mt19937 gen(rd());
74
std::uniform_real_distribution<> dis(0, 1);
75
- rnd = std::bind(dis, gen);
+ rnd = std::bind(dis, std::ref(gen));
76
}
77
78
static std::once_flag init_flag_;
79
- static std::function<> rnd;
+ static std::function<double()> rnd;
80
};
81
} // namespace operators
82
} // namespace paddle
0 commit comments