Comments (2)
Thank you for the request @AndreasKaratzas
However, every time I query my framework for some workload, I have to first use Python and compile a jit instance to later load in my framework
It wouldn't completely address your situation, but is it feasible for you to create the scripted model (in Python) once and for all and just load that one file every time?
I'm sorry that this is not the answer you're looking for, but I'm afraid the C++ models won't be coming back. For some context, we used to support direct C++ model access in the past, but the decision was made to deprecate that API in favour of torchscript. Whether this was a user-friendly decision in the long-term is up for debate, but the main reason at the time was that maintaining both the Python and C++ backend was just too much maintenance work. Some relevant past discussion: #4375 (comment)
If that helps and if it's an option for you, those C++ models were removed in https://github.com/pytorch/vision/pull/6632/files so you'll find the original C++ implementations there (some of these models may have been updated in Python since then).
from vision.
Hello @NicolasHug,
Thank you for your prompt response.
It wouldn't completely address your situation, but is it feasible for you to create the scripted model (in Python) once and for all and just load that one file every time?
This would be a nice solution generally. However, to my problem, there are several parameters that need to be taken into account. My domain primarily evolves around embedded systems, where the workload changes rapidly and frequently. In particular, regarding the case of edge data centers, there are various clients with different needs who post different queries on the edge systems. Therefore, these constrained devices must be capable of quickly serving each client. I opted for torch/TensorRT
to boost the performance of my framework. However, there is a huge computational burden and, worse of all, a power burden if I have to read the memory too frequently. Furthermore, due to the variety of available torch
models (torchvision
alone has more than 70 models), the solution of storing several hundreds of GBs on the embedded devices is not scalable and cannot streamline efficiency. I strongly think that my use case is not an extreme scenario and that torch/TensorRT
primarily targets such cases where performance and efficiency are primary challenges.
I also reviewed the pull request referenced. As pointed out, the models there are old and point to a rather old release of torchvision
.
Overall, I think that in the case of torch/TensorRT
, there is a huge benefit to reinstating and maintaining the CPP models. This is due to the target group that torch/TensorRT
attracts, which mostly chases performance, efficiency, and scalability in constrained devices.
from vision.
Related Issues (20)
- Mypy job is broken
- Regarding IMAGENET1K_V1 and IMAGENET1K_V2 weights
- Compiling resize_image: function interpolate not_implemented HOT 1
- AttributeError: module 'torchvision.transforms' has no attribute 'v2' HOT 1
- Run all torchvision models in one script. HOT 1
- Build fails: error: unknown type name 'j_decompress_ptr' HOT 3
- Differences in CPU vs CUDA resize for uint8 images HOT 2
- Enable Video models for other tasks
- Can't use gaussian_blur if sigma is a tensor on gpu HOT 3
- Mask r-cnn training runs infinitely without output or error HOT 1
- detection AnchorGenerator Source code issues HOT 1
- Video Reader's get_metadata function fails on videos with sound HOT 2
- Difficulty building on macOS HOT 3
- -
- Typo at `permutate_channels`
- retinanet num_classes includes the background HOT 3
- MPS test jobs are failing HOT 3
- Add vision-language models HOT 1
- Add mobilenetv4 support and pretrained models? HOT 5
- Allow passing a file-like object to torchvision.io.video.read_video HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vision.