r""" float() Casts all floating point parameters and buffers to ``float`` datatype. .. note:: This method modifies the module in-place. Returns: Module: self
(self: T)
| 1632 | return self._apply(lambda t: t.cuda(device)) |
| 1633 | |
| 1634 | def float(self: T) -> T: |
| 1635 | r""" |
| 1636 | float() |
| 1637 | |
| 1638 | Casts all floating point parameters and buffers to ``float`` datatype. |
| 1639 | |
| 1640 | .. note:: |
| 1641 | This method modifies the module in-place. |
| 1642 | |
| 1643 | Returns: |
| 1644 | Module: self |
| 1645 | """ |
| 1646 | return self._apply(lambda t: t.float() if t.is_floating_point() else t) |
| 1647 | |
| 1648 | def double(self: T) -> T: |
| 1649 | r""" |