|
|
@ -54,7 +54,7 @@ class SamplingIdKernel : public framework::OpKernel<T> {
|
|
|
|
static_cast<T>(context.Attr<float>("max")));
|
|
|
|
static_cast<T>(context.Attr<float>("max")));
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<int64_t> ids(batch_size);
|
|
|
|
std::vector<int64_t> ids(batch_size);
|
|
|
|
for (size_t i = 0; i < batch_size; ++i) {
|
|
|
|
for (int i = 0; i < batch_size; ++i) {
|
|
|
|
T r = dist(engine);
|
|
|
|
T r = dist(engine);
|
|
|
|
int idx = width - 1;
|
|
|
|
int idx = width - 1;
|
|
|
|
for (int j = 0; j < width; ++j) {
|
|
|
|
for (int j = 0; j < width; ++j) {
|
|
|
|