TensorDictBase.to_json#
- TensorDictBase.to_json(path, *, separator: str | None = None, lines: bool = False, **kwargs)#
Writes this TensorDict to a JSON file.
- Parameters:
path (str or Path) – Path to the output JSON file.
- Keyword Arguments:
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.