MCPcopy Create free account
hub / github.com/modelscope/modelscope / identity

Method identity

modelscope/models/science/unifold/modules/frame.py:215–224  ·  view source on GitHub ↗
(
        shape: Iterable[int],
        dtype: Optional[torch.dtype] = torch.float,
        device: Optional[torch.device] = torch.device('cpu'),
        requires_grad: bool = False,
    )

Source from the content-addressed store, hash-verified

213
214 @staticmethod
215 def identity(
216 shape: Iterable[int],
217 dtype: Optional[torch.dtype] = torch.float,
218 device: Optional[torch.device] = torch.device('cpu'),
219 requires_grad: bool = False,
220 ) -> Frame:
221 return Frame(
222 Rotation.identity(shape, dtype, device, requires_grad),
223 zero_translation(shape, dtype, device, requires_grad),
224 )
225
226 def __getitem__(
227 self,

Callers 3

forwardMethod · 0.45
__init__Method · 0.45

Calls 3

FrameClass · 0.85
zero_translationFunction · 0.85
deviceMethod · 0.45

Tested by

no test coverage detected