colossalai.nn.loss.loss_2p5d
- class colossalai.nn.loss.loss_2p5d.CrossEntropyLoss2p5D(reduction=True, *args, **kwargs)[source]
Cross entropy loss for 2.5D parallelism
- Parameters
reduction (bool, optional) – whether to average the loss, defaults to True.
The
argsandkwargsshould include parameters below:weight (Tensor, optional) size_average (bool, optional) ignore_index (int, optional) reduce (bool, optional) label_smoothing (float, optional)
More details about
args,kwargsandtorch.nn.functional.cross_entropycould be found in Cross_entropy.