to_empty

FullyConnected.to_empty(*, device: int | str | device | None, recurse: bool = True) T

Move the parameters and buffers to the specified device without copying storage.

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

Returns:

self

Return type:

Module