warmspringwinds / pytorch-cpp

Pytorch C++ Library
369 stars 68 forks source link

preprocess_batch might cause transfer to CPU, possible bug #4

Open warmspringwinds opened 6 years ago

warmspringwinds commented 6 years ago

Inspect the preprocess_batch -- it might cause the transfer to CPU in case we are working with GPU tensors.

Having fixed that will improve the performance.

https://github.com/warmspringwinds/pytorch-cpp/blob/master/src/pytorch.cpp#L1280