提交 b30bdde1 编写于 作者: T tangwei12

random optimize

上级 9c63fef6
......@@ -72,11 +72,11 @@ class SamplingIdKernel : public framework::OpKernel<T> {
// Standard mersenne_twister_engine seeded with rd()
std::mt19937 gen(rd());
std::uniform_real_distribution<> dis(0, 1);
rnd = std::bind(dis, gen);
rnd = std::bind(dis, std::ref(gen));
}
static std::once_flag init_flag_;
static std::function<> rnd;
static std::function<double()> rnd;
};
} // namespace operators
} // namespace paddle
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册