ScriptFunction¶ class torch.jit.ScriptFunction¶ 在功能上等效于 ScriptModule,但表示单个函数,没有属性或参数。 get_debug_state(self: torch._C.ScriptFunction) → torch._C.GraphExecutorState¶ save(self: torch._C.ScriptFunction, filename: str, _extra_files: dict[str, str] = {}) → None¶ save_to_buffer(self: torch._C.ScriptFunction, _extra_files: dict[str, str] = {}) → bytes¶