Git Product home page Git Product logo

Comments (2)

cocoa-xu avatar cocoa-xu commented on August 22, 2024 1

Hi @mnishiguchi, I intend to also port TFLite in Erlang so I'll probably keep them for the completeness of the APIs for now. And I'll revisit this issue when the Erlang part is done. :)

from tflite_beam.

cocoa-xu avatar cocoa-xu commented on August 22, 2024
out_tensor.type
# vs
type = TFLite.TFLiteTensor.type(out_tensor)

I think this should be okay as we also have the same thing in :nx.

iex> tensor = Nx.iota({2,2})
iex> tensor.type
{:s, 64}
iex> Nx.type(tensor)
{:s, 64}

As for TFLiteTensor.dims/1 vs tensor.shape, I'm thinking that keeping both, but TFLiteTensor.dims/1 will behave the same as TFLite's C++ API, which gives tensor's dimension in an array, e.g., [1, 224, 224, 3]; while tensor.shape will follow :nx's convention, which would return the dimensions in a tuple, e.g., {1, 224, 224, 3}. Furthermore, I'll add a TFLiteTensor.shape/1 function to mirror what we have in :nx.

iex> tflite_tensor.type
{:s, 64}
iex> TFLiteTensor.type(tflite_tensor)
{:s, 64}
iex> tflite_tensor.shape
{1, 224, 224, 3}
iex> TFLiteTensor.shape(tflite_tensor)
{1, 224, 224, 3}
iex> TFLiteTensor.dims(tflite_tensor)
[1, 224, 224, 3]

from tflite_beam.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.