aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/batching/kernels/batch_kernels.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/batching/kernels/batch_kernels.cc')
-rw-r--r--tensorflow/contrib/batching/kernels/batch_kernels.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/contrib/batching/kernels/batch_kernels.cc b/tensorflow/contrib/batching/kernels/batch_kernels.cc
index 1e0957298b..3c06325651 100644
--- a/tensorflow/contrib/batching/kernels/batch_kernels.cc
+++ b/tensorflow/contrib/batching/kernels/batch_kernels.cc
@@ -347,6 +347,7 @@ class BatchResource : public ResourceBase {
// Concatenate the tasks ith input tensors into a big output tensor.
std::vector<Tensor> to_concatenate;
+ to_concatenate.reserve(batch->num_tasks());
for (int task_idx = 0; task_idx < batch->num_tasks(); ++task_idx) {
to_concatenate.push_back(batch->task(task_idx).inputs.at(i));
}