mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-18 16:00:49 +00:00
html refactor (#555)
This commit is contained in:
@@ -27,7 +27,7 @@ class CrossEntropyLoss2D(_Loss):
|
||||
reduce (bool, optional)
|
||||
label_smoothing (float, optional)
|
||||
|
||||
More details about args, kwargs and torch.nn.functional.cross_entropy could be found in
|
||||
More details about ``args``, ``kwargs`` and ``torch.nn.functional.cross_entropy`` could be found in
|
||||
`Cross_entropy <https://pytorch.org/docs/stable/generated/torch.nn.functional.cross_entropy.html#torch.nn.functional.cross_entropy>`_.
|
||||
"""
|
||||
|
||||
|
@@ -27,7 +27,7 @@ class CrossEntropyLoss2p5D(_Loss):
|
||||
reduce (bool, optional)
|
||||
label_smoothing (float, optional)
|
||||
|
||||
More details about args, kwargs and torch.nn.functional.cross_entropy could be found in
|
||||
More details about ``args``, ``kwargs`` and ``torch.nn.functional.cross_entropy`` could be found in
|
||||
`Cross_entropy <https://pytorch.org/docs/stable/generated/torch.nn.functional.cross_entropy.html#torch.nn.functional.cross_entropy>`_.
|
||||
"""
|
||||
def __init__(self, reduction=True, *args, **kwargs):
|
||||
|
@@ -27,7 +27,7 @@ class CrossEntropyLoss3D(_Loss):
|
||||
reduce (bool, optional)
|
||||
label_smoothing (float, optional)
|
||||
|
||||
More details about args, kwargs and torch.nn.functional.cross_entropy could be found in
|
||||
More details about ``args``, ``kwargs`` and ``torch.nn.functional.cross_entropy`` could be found in
|
||||
`Cross_entropy <https://pytorch.org/docs/stable/generated/torch.nn.functional.cross_entropy.html#torch.nn.functional.cross_entropy>`_.
|
||||
"""
|
||||
|
||||
|
@@ -23,7 +23,7 @@ class MoeCrossEntropyLoss(_Loss):
|
||||
reduction (str, optional)
|
||||
label_smoothing (float, optional)
|
||||
|
||||
More details about args, kwargs and torch.nn.functional.cross_entropy could be found in
|
||||
More details about ``args``, ``kwargs`` and ``torch.nn.functional.cross_entropy`` could be found in
|
||||
`Cross_entropy <https://pytorch.org/docs/stable/generated/torch.nn.functional.cross_entropy.html#torch.nn.functional.cross_entropy>`_.
|
||||
"""
|
||||
|
||||
@@ -40,7 +40,7 @@ class MoeCrossEntropyLoss(_Loss):
|
||||
input (:class:`torch.tensor`): Predicted unnormalized scores (often referred to as logits).
|
||||
target (:class:`torch.tensor`): Ground truth class indices or class probabilities.
|
||||
|
||||
More details about args, kwargs and torch.nn.functional.cross_entropy could be found in
|
||||
More details about ``args``, ``kwargs`` and ``torch.nn.functional.cross_entropy`` could be found in
|
||||
`Cross_entropy <https://pytorch.org/docs/stable/generated/torch.nn.functional.cross_entropy.html#torch.nn.functional.cross_entropy>`_.
|
||||
"""
|
||||
main_loss = self.loss(*args)
|
||||
|
Reference in New Issue
Block a user