IO[bytes]*]) -- a file-like object (has to implement
        "read()", "readline()", "tell()", and "seek()"), or a string
        or os.PathLike object containing a file name
  * **map_location**
    (*Optional**[**Union**[**Callable**[**[**Tensor**, **str**]**,
    **Tensor**]**, **device**, **str**, **Dict**[**str**,
    **str**]**]**]*) -- a function, "torch.device", string or a
    dict specifying how to remap storage locations

  * **pickle_module** (*Optional**[**Any**]*) -- module used for
    unpickling metadata and objects (has to match the
    "pickle_module" used to serialize file)

  * **weights_only** (*bool*) -- Indicates whether unpickler
    should be restricted to loading only tensors, primitive types
    and dictionaries

  * **pickle_load_args** (*Any*) -- (Python 3 only) optional
    keyword arguments passed over to "pickle_module.load()" and
    "pickle_module.Unpickler()", e.g., "errors=...".

Return type: