Closed anshuman23 closed 6 years ago
@versilov how do we control the type in matrex? are they always 64-bit precision floats?
@josevalim, right now all matrices in Matrex are 2-d arrays of 32-bit floats. It takes twice less space and is twice faster in operation, than double.
I am now working in array
branch on new representation inspired by NumPy's mdarray: with support for different types, arbitrary dimensions, storing data shape separately from the data and with strides (which gives us constant time transposing, for example).
At the moment I am going to support these types: :float32 | :float64 | :int16 | :int32 | :int64 | :byte | :bool
I'll try to preserve existing API as much, as possible, with 32-bit float being the default data type.
See https://github.com/versilov/matrex/blob/array/lib/matrex/array.ex
At the moment I am going to support these types: :float32 | :float64 | :int16 | :int32 | :int64 | :byte | :bool
Beautiful. If there is anyway I can help please let me know! I will take a look at the code later today.
It's a bit early for code review, right now I'am stuck with this question: https://elixirforum.com/t/define-a-set-of-functions-with-a-macro/14517
I started reading "Metaprogramming Elixir", but would be grateful, if you point me in the right direction:)
@versilov sorry for the delay, i posted an answer there. :)
For the time being, both the
TF_FLOAT
andTF_DOUBLE
tensor types are now supported. The matrices created are still 64 bit floats, though. I do not want to complicate the matrix functions right now, as at the end we will move to using Matrex more than the in-house Tensorflex matrix functions.Next up: Support for Tensorflow Sessions!