xnn.common.deploy.lammps.export_torchscript#
- xnn.common.deploy.lammps.export_torchscript(model, path)[source]#
Generic TorchScript export (e.g. for custom C++/Python serving).
Compiles the model directly with
torch.jit.script(without the LAMMPS tensor-ABI wrapper) and saves the scripted module topath.- Parameters:
model (torch.nn.Module) – The model to serialize. It is put in
evalmode before scripting.path (str) – Destination file path for the scripted
.ptarchive.
- Returns:
The
paththe scripted model was saved to.- Return type: