MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / double

Method double

python/oneflow/nn/modules/module.py:1648–1660  ·  view source on GitHub ↗

r""" double() Casts all floating point parameters and buffers to ``double`` datatype. .. note:: This method modifies the module in-place. Returns: Module: self

(self: T)

Source from the content-addressed store, hash-verified

1646 return self._apply(lambda t: t.float() if t.is_floating_point() else t)
1647
1648 def double(self: T) -> T:
1649 r"""
1650 double()
1651
1652 Casts all floating point parameters and buffers to ``double`` datatype.
1653
1654 .. note::
1655 This method modifies the module in-place.
1656
1657 Returns:
1658 Module: self
1659 """
1660 return self._apply(lambda t: t.double() if t.is_floating_point() else t)
1661
1662 def half(self: T) -> T:
1663 r"""

Calls 2

_applyMethod · 0.95
is_floating_pointMethod · 0.45