crnn-audio-classification
crnn-audio-classification copied to clipboard
how to transfowm the model file to Torchscript
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
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?