Is it possible to use third party torch7 packages in pytorch?
kirk86
No, we don’t support loading Lua modules in Python
apaszke
kirk86
No there’s not, but I’m pretty sure you can find something in a (much richer) Python ecosystem. You can easily convert between tensors and numpy arrays.
apaszke
kirk86
I’m afraid that won’t work. PyTorch uses a slightly different version of C backends (0 vs 1-based indexing), and when you load Lua packages with lutorpy, it will resolve the Lua backend symbols to 0-based ones, likely leading to errors in weird places.
apaszke
kirk86
No, PyTorch packages have been redesigned and rewritten from scratch.
apaszke
kirk86
I believe the functions you’re looking for are implemented in scipy and/or scikit-learn, and you can use them by calling .numpy and .from_numpy on Torch tensors.
jekbradbury
kirk86