, compile_model=False)

Saves the module's configuration and parameters to files in the specified directory. It creates two files, namely config.json and which contain the configuration and parameters, respectively.

  • path (Union[str, PathLike]) -- The directory to which to save the configuration and parameter files. The directory may or may not exist but no parent directories are created.

  • compile_model (bool) -- Whether the model should be compiled via TorchScript. An additional file called model.ptc will then be stored. Note that you can simply load the compiled model via torch.jit.load() at a later point.

Return type: