File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,13 @@ class SamplingIdKernel : public framework::OpKernel<T> {
53
53
static_cast <T>(context.Attr <float >(" min" )),
54
54
static_cast <T>(context.Attr <float >(" max" )));
55
55
56
+ <<<<<<< HEAD
57
+ std::vector<int64_t > ids (batch_size);
58
+ for (size_t i = 0 ; i < batch_size; ++i) {
59
+ =======
56
60
std::vector<T> ids (batch_size);
57
61
for (int i = 0 ; i < batch_size; ++i) {
62
+ >>>>>>> 823c4f87beff04e4029e3f4a183658621ca8f01b
58
63
T r = dist (engine);
59
64
int idx = width - 1 ;
60
65
for (int j = 0 ; j < width; ++j) {
@@ -63,7 +68,11 @@ class SamplingIdKernel : public framework::OpKernel<T> {
63
68
break ;
64
69
}
65
70
}
71
+ <<<<<<< HEAD
72
+ ids[i] = int64_t (idx);
73
+ =======
66
74
ids[i] = ins_vector[idx];
75
+ >>>>>>> 823c4f87beff04e4029e3f4a183658621ca8f01b
67
76
}
68
77
69
78
std::vector<int64_t > out_dim;
You can’t perform that action at this time.
0 commit comments