MCPcopy Create free account
hub / github.com/devinxzhang/MFuser / forward

Method forward

mmseg/core/ddp_wrapper.py:102–112  ·  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

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

Callers

nothing calls this directly

Calls 1

scatterMethod · 0.95

Tested by

no test coverage detected