Closed Nikita-Sherstnev closed 1 year ago
Hi @Nikita-Sherstnev,
It is theoretically possible to separate the PyTorch and ONNX parts, but in the current design the parts are tightly coupled:
When the model is already converted to PyTorch, ONNX dependency is not required to for inference or train, but in the current implementation, the imports of PyTorch and ONNX are in the same file -- removing ONNX will result in an ImportError
exception.
I just tried working around this by installing onnx2torch and onnx using pip's --no-dependencies switch:
pip install onnx2torch onnx --no-dependencies
and my model loaded successfully 🍡.
Hello there! Great job on the library. When I try to load the model with Torch, it requires having both ONNX and this library installed as dependencies. Is there a way to eliminate this dependencies completely, perhaps by manually rewriting the network?