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

torchvision.ops #56

Open
dominikj2 opened this issue Aug 12, 2021 · 3 comments
Open

torchvision.ops #56

dominikj2 opened this issue Aug 12, 2021 · 3 comments

Comments

@dominikj2
Copy link

Hi @dfalbel ,

Is it possible to have an R Torch version of torchvision.ops (operators for Computer Vision).

https://pytorch.org/vision/stable/ops.html

p.s. I am particularly interested in torchvision.ops.roi_align.

I'd be interested in learning to help get these operators available in R Torch if provided with some guidance. I have python and R programming background but no C++. Willing to learn C++ on the task if its a small set of tasks that needs repetition for each operator. Not sure if my proposition sounds helpful.

@dfalbel dfalbel transferred this issue from mlverse/torch Aug 12, 2021
@dfalbel
Copy link
Member

dfalbel commented Aug 12, 2021

Currently this is not possible. This is something I'll be working on after the next release of torch.

I will let you know hot it goes, but I think at least the first iteration to implement this is quite complicated. I don't have yet clear on my mind how this should work.

To unblock you, one thing that you could do is to add the code from roi_align into torch. The approach would be similar to: https://github.com/mlverse/torch/pull/619/files

@dominikj2
Copy link
Author

Yes, you did https://github.com/mlverse/torch/pull/619/files for me and I thought that integrating roi_align could be implemented with a similar approach.

Do you have resources that I could learn from to apply this approach? I would like to start learning and hopefully contribute more. Maybe (if it's not a hassle for you) next time you do something similar to https://github.com/mlverse/torch/pull/619/files, I would love to do a zoom meeting with recorded screen share showing the process? Only if it doesn't slow you down. I'm not sure how much of the process follows a "template" and "standard procedure" and how much of it is very unique to each torchvision.op. Anyway keep me in mind as I want to learn and contribute.

@dominikj2
Copy link
Author

Hi @dfalbel,

I spent much of the day learning JIT, LibTorch distribution, and Torch Script ( tracing and annotation). Well done with JIT tracing for Torch! Is you next plan to develop ScriptModule for control flow capabilities and more (i.e. torch.jit.script) ?

Quick question, when R Torch has torch.jit.script capabilities, will that mean all/most pytorch torchvision.op can be converted to Torch Script and loaded into R Torch using JIT? Would this effectively automate the procedure that you undertook to put sort_vertices in contrib (i.e. building C++ application using CMake and LibTorch for the contrib.op)?

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

No branches or pull requests

2 participants