tabensemb.model.AbstractNN.all_gather#
method
- AbstractNN.all_gather(data: Tensor | Dict | List | Tuple, group: Any | None = None, sync_grads: bool = False) Tensor | Dict | List | Tuple#
Allows users to call
self.all_gather()from the LightningModule, thus making theall_gatheroperation accelerator agnostic.all_gatheris a function provided by accelerators to gather a tensor from several distributed processes.- Parameters:
- Returns:
A tensor of shape (world_size, batch, …), or if the input was a collection the output will also be a collection with tensors of this shape.