1.Could someone help me figure out the differences...
# mathematics
a
1.Could someone help me figure out the differences between KMath and MultiK ? 2.When should we use one over the other ?Should we use both ? What if we're interested in tensors manipulation ? 3. Are they both still being developed?
a
Let me start from the end. 3. Yes, they are both are actively developed.
The key difference is that KMath is focused on abstractions and integrating different existing libraries (including MultiK - https://github.com/mipt-npm/kmath/tree/dev/kmath-multik), MultiK is focused on user-oriented API and mixing native and JVM operations.
KMath is designed as multiplatform, MultiK is currently JVM-only.
👍 1
And finally, MultiK is supported and sponsored by JetBrains, while KMath is a community project. We get informational support from JetBrains and free licenses of course.
Tensor manipulation is a broad term. MultiK has several operations on numeric tensors and is reasonably fast. KMath-dev now have full support for tensors (I hope release will be soon), including MultiK implementation. The core implementation is not optimized for some operations (pretty fast for others), but we are working on MultiK and TensorFlow connectors. Stay tuned.
a
@altavir In my case I'd want numerical tensors operations but not necessarily any third party Integration with Tensorflow. Can KMath be used without depending on third parties? Also could you give more details on what you mean by "KMath is focused on abstraction"? It looks like both support basic operations like add, sum, substract etc, dot, multication, normalize, mean , std. I'm looking into something close to Numpy for pre/post processing of tensors before/after sending it to a DL model but I don't need third party integration as the communication with the model can be via ONNX runtime or HTTP. So ONNX integration would be nice but not mandatory as I can simply write a quick converter if needed.
a
MultiK is more numpy-like in this regards, in KMath there are separate `Algebra`s for different kind of operations. And for example you can use one algebra for testing and another one for production. KMath tensors are usable without any dependencies. They are not released in production mode yet. but you can see some examples here: https://github.com/mipt-npm/kmath/tree/dev/examples/src/main/kotlin/space/kscience/kmath/tensors If you want to work with DL, you can also check https://github.com/JetBrains/KotlinDL it is based on TensorFlow and should have all basic things as well.
👍 2
z
With multik will be best choice for fast copying post/preprocessing numpy code for models, I hope that current release and probably 1-2 next will cover all popular numpy ops widely used for image pre/post processing
👍 2