Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensors of TF_FLOAT and TF_DOUBLE type both supported #10

Merged
merged 1 commit into from
Jun 2, 2018
Merged

Conversation

anshuman23
Copy link
Owner

For the time being, both the TF_FLOAT and TF_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!

@anshuman23 anshuman23 merged commit 19726fd into master Jun 2, 2018
@josevalim
Copy link
Contributor

@versilov how do we control the type in matrex? are they always 64-bit precision floats?

@versilov
Copy link
Contributor

versilov commented Jun 2, 2018

@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

@josevalim
Copy link
Contributor

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.

@versilov
Copy link
Contributor

versilov commented Jun 4, 2018

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:)

@josevalim
Copy link
Contributor

@versilov sorry for the delay, i posted an answer there. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants