MnistModel.to_empty#
- MnistModel.to_empty(*, device: Optional[Union[int, str, device]], recurse: bool = True) T #
Move the parameters and buffers to the specified device without copying storage.
- Args:
- device (
torch.device
): The desired device of the parameters and buffers in this module.
- recurse (bool): Whether parameters and buffers of submodules should
be recursively moved to the specified device.
- device (
- Returns:
Module: self