Git Product home page Git Product logo

Comments (5)

raedle avatar raedle commented on July 23, 2024

Thanks for reporting this and for submitting PR #27 to report the differences in the API docs, @mdwelsh!

from playtorch.

JohnZcp avatar JohnZcp commented on July 23, 2024

So instead of using tuple and list, how can construct my "unpack" part for the tuple of the lists?

from playtorch.

kyleliang919 avatar kyleliang919 commented on July 23, 2024

Quick question: how was the IOS object detection demo implemented if tuple wasn't supported on IOS

from playtorch.

raedle avatar raedle commented on July 23, 2024

@mdwelsh, @JohnZcp, and @kyleliang919, the react-native-pytorch-core release candidate v0.2.0-rc.2 has a PyTorch-inspired API to support a more flexible data processing.

Tuples are now supported on both platforms Android and iOS with the PyTorch Live JavaScript API. For example, the following will run inference and destruct the output (tuple) into y and z.

const x = torch.rand([1, 3, 600, 600]);
const output = await model.forward<Tensor, Tensor[]>(x);
const y = output[0];
const z = output[1];
// or const [y, z] = output;

Check out this example for YOLOv5s integration with PyTorch Live ObjectDetection.ts!

More details on available ops are is in the API docs:

Feel free to reach out on Discord or here if any ops are missing for your use cases!

from playtorch.

chrisklaiber avatar chrisklaiber commented on July 23, 2024

Closing this issue out since the packer / unpacker approach was removed with 0.2.2. Check out the PyTorch-inspired API in the README as an alternative that avoids these issues: https://github.com/facebookresearch/playtorch/tree/main/react-native-pytorch-core#example-usage

from playtorch.

Related Issues (20)

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.