MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / forward

Method forward

detrsmpl/core/distributed_wrapper.py:99–109  ·  view source on GitHub ↗

Forward function. Args: inputs (tuple): Input data. kwargs (dict): Args for ``mmcv.parallel.scatter_gather.scatter_kwargs``.

(self, *inputs, **kwargs)

Source from the content-addressed store, hash-verified

97 return scatter_kwargs(inputs, kwargs, device_ids, dim=self.dim)
98
99 def forward(self, *inputs, **kwargs):
100 """Forward function.
101
102 Args:
103 inputs (tuple): Input data.
104 kwargs (dict): Args for
105 ``mmcv.parallel.scatter_gather.scatter_kwargs``.
106 """
107 inputs, kwargs = self.scatter(inputs, kwargs,
108 [torch.cuda.current_device()])
109 return self.module(*inputs[0], **kwargs[0])
110
111 def train_step(self, *inputs, **kwargs):
112 """Train step function.

Callers

nothing calls this directly

Calls 1

scatterMethod · 0.95

Tested by

no test coverage detected