mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Add a reserve in sampler.cc.
PiperOrigin-RevId: 824620123
This commit is contained in:
parent
6d8ae3a9d7
commit
428f0df91b
|
|
@ -82,6 +82,7 @@ class ExponentialBuckets : public Buckets {
|
||||||
int bucket_count) {
|
int bucket_count) {
|
||||||
CHECK_GT(bucket_count, 0);
|
CHECK_GT(bucket_count, 0);
|
||||||
std::vector<double> bucket_limits;
|
std::vector<double> bucket_limits;
|
||||||
|
bucket_limits.reserve(bucket_count);
|
||||||
double bound = scale;
|
double bound = scale;
|
||||||
for (int i = 0; i < bucket_count; i++) {
|
for (int i = 0; i < bucket_count; i++) {
|
||||||
bucket_limits.push_back(bound);
|
bucket_limits.push_back(bound);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user