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

Method to

python/oneflow/nn/modules/module.py:1446–1451  ·  view source on GitHub ↗
(
        self: T,
        device: Optional[Union[int, str, flow.device]] = ...,
        dtype: Optional[flow.dtype] = ...,
    )

Source from the content-addressed store, hash-verified

1444
1445 @overload
1446 def to(
1447 self: T,
1448 device: Optional[Union[int, str, flow.device]] = ...,
1449 dtype: Optional[flow.dtype] = ...,
1450 ) -> T:
1451 ...
1452
1453 @overload
1454 def to(self: T, dtype: flow.dtype) -> T:

Callers 7

slice_update_opFunction · 0.45
__init__Method · 0.45
convertMethod · 0.45
as_tensorFunction · 0.45
to_memory_formatMethod · 0.45
to_memory_formatMethod · 0.45
forwardMethod · 0.45

Calls 4

_to_memory_formatMethod · 0.95
_applyMethod · 0.95
popMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected