W3cubDocs

/PyTorch 2.9

ScriptFunction

class torch.jit.ScriptFunction

Functionally equivalent to a ScriptModule, but represents a single function and does not have any attributes or Parameters.

get_debug_state(self: torch._C.ScriptFunction) → torch._C.GraphExecutorState
save(self: torch._C.ScriptFunction, filename: str, _extra_files: collections.abc.Mapping[str, str] = {}) → None
save_to_buffer(self: torch._C.ScriptFunction, _extra_files: collections.abc.Mapping[str, str] = {}) → bytes

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.jit.ScriptFunction.html