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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bringing TorchVision models into C++ API #15639
Comments
This seems reasonable, though I'd say this would probably live in pytorch/vision in that case https://github.com/pytorch/vision (or maybe a separate repo? Not sure.) cc @fmassa @soumith |
Hi @ezyang |
As Edward mentioned, it's a pretty good suggestion, but we should put them in https://github.com/pytorch/vision and not in https://github.com/pytorch/pytorch Go ahead and start working on it, and thank you :) |
Yes, this is a good thing to have! One thing that would be worth keeping in mind is how to keep both the C++ and the Python version of the models in sync. |
Hi @soumith |
@fmassa |
@ShahriarSS I meant when Python code changes, it would be good to have a way of checking that the C++ code should change as well |
@fmassa Sorry I misunderstood. I am trying to write the code that matches the python code so it will be easy to change the code when the python code changes. |
馃殌 Feature
Hi. I wanted to bring TorchVision models into C++ API.
Motivation
I was working on a project with the C++ front-end and I wanted to test networks like AlexNet and VGG and ResNet and inception to see the difference in accuracy. I searched a bit and I found out that I must make a Torch script module from a TorchVision model but the problem is that I want to train with the C++ front-end and script modules are either in train or eval mode and this cannot be changed after exporting.
Pitch
I want to implement and bring these models into the C++ API.
Alternatives
One of the alternatives can be exporting a model in both train and eval mode and training the train module and somehow copy the weights of them to eval module and get predictions from there.
Additional context
I read the source code of TorchVision and was able to implement and test AlexNet and VGG and implement ResNet.
The text was updated successfully, but these errors were encountered: