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

how to transfowm the model file to Torchscript #8

Open
jokerpp opened this issue Apr 8, 2020 · 1 comment
Open

how to transfowm the model file to Torchscript #8

jokerpp opened this issue Apr 8, 2020 · 1 comment

Comments

@jokerpp
Copy link

jokerpp commented Apr 8, 2020

hello , i wonder if i can know how to transfowm the model file to Torchscript , so i can call the function by C++ .
i looked up a lot of information , but what i found is too simple case .

for example:
model = torchvision.models.resnet18()
example = torch.rand(1, 3, 224, 224)
traced_script_module = torch.jit.trace(model, example)

or like this:
my_module = MyModule(10,20)
sm = torch.jit.script(my_module)

but that is not suit for us , i can't transform model like that , so ,can you help me with this problem

@ksanjeevan
Copy link
Owner

Hey @jokerpp. I think ideally I want to move the repo to use torchaudio instead of torhaudio_contrib. Are you getting any specific error when you try to script the module?

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