Haskell and Tensorflow

Is there any libraries that uses Tensorflow as wrapper for machine learning algorithms? I’ll try to create one but is it has I’ll love to contribute!
I’m trying to use haskell for data analysis and machine learning stuff, and I know that python exists (I use for most of ML things in real-world), but for my side projects I want to use haskell, any ideas?

2 Likes

There’s GitHub - tensorflow/haskell: Haskell bindings for TensorFlow and GitHub - hasktorch/hasktorch: Tensors and neural networks in Haskell, but what would be really nice is Jax-haskell bindings, since jax is already a pure functional library. I don’t think that exists yet.

3 Likes

+1 on having Jax bindings. I would try to help, if I get some time. Also, there are bindings to XLA already, as a starting point: Haskell and XLA

Hasktorch is binding to PyTorch.

3 Likes

That’s nice, I’ll check on JAX bindings, but I will try to create a wrapper in tensorflow for something like scikit-learn or keras you know?

Keras would be nice, since it tries to be platform agnostic (same code can then be used to run with TF, PyTorch or Jax). But it’s just Python-only. We can create a Keras-like API in Haskell that will wrap TF/PT/Jax.

Scikit is a totally different thing. Many years ago, there was a data-haskell group and there was a discussion to use hmatrix to implement APIs similar to scikit

But thinking on scikit, is there any library that did this? Something wrapping around hmatrix? I like to start with “simple” machine learning algorithms as a collection of functions to be ready for production someday, but I’ll really consider about a keras-like api for haskell