First PR for the new PyTorch backend, this PR introduces the following user-facing classes:
Block
Batch
Sequence
And internal classes:
TorchScriptWrapper
BlockContainer
Implementation Details :construction:
TorchScriptWrapper makes it easier to work with torch-script. It will check the forward method and then stores various properties of it as constants. This way, torchscript doesn't need to worry about it.
Testing Details :mag:
Since these are some of the lowest-level classes, I tried to maximize test-coverage as much as possible
Goals :soccer:
First PR for the new PyTorch backend, this PR introduces the following user-facing classes:
Block
Batch
Sequence
And internal classes:
TorchScriptWrapper
BlockContainer
Implementation Details :construction:
TorchScriptWrapper
makes it easier to work with torch-script. It will check the forward method and then stores various properties of it as constants. This way, torchscript doesn't need to worry about it.Testing Details :mag:
Since these are some of the lowest-level classes, I tried to maximize test-coverage as much as possible