DataTaunew | comments | leaders | submitlogin
Convert A NumPy Array To A PyTorch Tensor (aiworkbox.com)
5 points by iheartai 328 days ago | 1 comment


1 point by stsievert 323 days ago | link

PyTorch Tensors and Numpy ndarrays share the same memory locations. Conversion from a Tensor to ndarray happens in constant time and is very quick (500-1000ns):

http://stsievert.com/blog/2017/09/07/pytorch/#numpyscipy-int...

-----




RSS | Announcements