Any functions providing matrix multiplication?

Dear All

I would like to do matrix multiplication in elixir. I haven’t found a library that does this. Nx.multiply/2 and Matrex.multiply/2 do element-wise multiplication of two tensors.

I wrote this naive version that does matrix multiplication on Nx.tensors (in a gist):

Elixir matrix multiplication with Nx.tensors · GitHub

All feedback welcome as I’m just finding my feet with elixir, also if there’s a library that already has this.

Thanks!

Ivan

I believe you want Nx.dot/2.

If both a and b are 2-D tensors (matrices), it is equivalent to matrix-multiplication.

That’s the one. Thanks!