NVIDIA / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
672 stars 263 forks source link

Improve Vector Performance - Save Reallocation Cost #552

Closed shahzadlone closed 5 years ago

shahzadlone commented 5 years ago

We know the number of elements pushed into the vector will be (1 + bottom[0]->shape().size()). So reserve it, to save on reallocation costs.

shahzadlone commented 5 years ago

Is there anything from my side I need to provide more?