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 to path.

Parameters:
  • model (torch.nn.Module) – The model to serialize. It is put in eval mode before scripting.

  • path (str) – Destination file path for the scripted .pt archive.

Returns:

The path the scripted model was saved to.

Return type:

str