PyTorch integration #49
Replies: 2 comments 5 replies
-
Well, it's a good question, and I prepared two answers: short and long. The short answer: Yes, currently, it's on the roadmap, and the earliest support is planned for a 0.5 or 0.6 release. The long answer: both TensorFlow and PyTorch have Java APIs, but only TensorFlow Java API gives us the ability to train models. The PyTorch Java API is built for inference on mobile devices and has no additional support for transfer learning and training. Also, I could not find any plans from Facebook to publish better Java API in the nearest future. There are a few ways: to contribute in PyTorch Java API or wrap PyTorch C++ API with JNI or JavaCPP project. There are a few experiments with writing JNI bindings for this C++ API in Java/Kotlin community, we hope they become more mature during this year (like Java API for TensorFlow) to switch on them or start our own if these experiments will be frozen. Also, for high-level API is not so important what GPU kernels are used under the hood to perform tensor multiplications and additions. To start to implement PyTorch-like API we don't need the Torch runtime at all :) |
Beta Was this translation helpful? Give feedback.
-
BTW, there are at least a few people currently happily using the JavaCPP Presets for PyTorch: |
Beta Was this translation helpful? Give feedback.
-
Hello,
With PyTorch gaining more and more traction these days, does the KotlinDL team plan on supporting PyTorch as well in the future or is this an uncertainty for now?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions