MCPcopy Create free account
hub / github.com/pytorch/pytorch / parallel_apply

Method parallel_apply

torch/nn/parallel/data_parallel.py:199–200  ·  view source on GitHub ↗
(self, replicas: Sequence[T], inputs: Sequence[Any], kwargs: Any)

Source from the content-addressed store, hash-verified

197 return scatter_kwargs(inputs, kwargs, device_ids, dim=self.dim)
198
199 def parallel_apply(self, replicas: Sequence[T], inputs: Sequence[Any], kwargs: Any) -> List[Any]:
200 return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
201
202 def gather(self, outputs: Any, output_device: Union[int, torch.device]) -> Any:
203 return gather(outputs, output_device, dim=self.dim)

Callers 4

forwardMethod · 0.95
test_parallel_applyMethod · 0.80

Calls 1

parallel_applyFunction · 0.90