KMeansModel.save

KMeansModel.save(path, compile_model=False)

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

Parameters:
  • 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:

None