zhanghang1989 / zhanghang1989/PyTorch-Encoding
These functions are not supported by TorchScript. Any solutions?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 448
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I'm working on converting the trained model to format .pt which can be used in c++, and there are some functions not supported by TorchScript(torch.jit).
In functions/encoding.py line 61 & 95:
.apply() not supported.
In line 24:
these methods implemented by pybind11 are not supported.
Are there any convenient solutions, such as implement it with methods packaged by PyTorch? Hoping some suggestions, and I will do it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting functions/encoding.py at lines 24, 61, and 95 and reproducing the .pt conversion with TorchScript. Done means the affected functions no longer trigger the reported unsupported-method errors and the converted model can be used from C++.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100