r"""Moves the parameters and buffers to the specified device without copying storage. Args: device (:class:`oneflow.device`): the desired device of the parameters and buffers in this module Returns: Module: self
(self: T, *, device: Union[str, flow.device])
| 1406 | return self |
| 1407 | |
| 1408 | def to_empty(self: T, *, device: Union[str, flow.device]) -> T: |
| 1409 | r"""Moves the parameters and buffers to the specified device without copying storage. |
| 1410 | |
| 1411 | Args: |
| 1412 | device (:class:`oneflow.device`): the desired device of the parameters |
| 1413 | and buffers in this module |
| 1414 | |
| 1415 | Returns: |
| 1416 | Module: self |
| 1417 | """ |
| 1418 | return self._apply(lambda t: flow.empty_like(t, device=device)) |
| 1419 | |
| 1420 | def _to_memory_format(self, memory_format): |
| 1421 | r"""Casts the parameters and buffers in this module to another memory format. |