mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[Doc] Add weight dtype in torch.nn.CrossEntropyLoss (#110998)
Fixes #101213 Pull Request resolved: https://github.com/pytorch/pytorch/pull/110998 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
d589106bcd
commit
6c7013a3dc
@ -1106,7 +1106,7 @@ class CrossEntropyLoss(_WeightedLoss):
|
||||
|
||||
Args:
|
||||
weight (Tensor, optional): a manual rescaling weight given to each class.
|
||||
If given, has to be a Tensor of size `C`
|
||||
If given, has to be a Tensor of size `C` and floating point dtype
|
||||
size_average (bool, optional): Deprecated (see :attr:`reduction`). By default,
|
||||
the losses are averaged over each loss element in the batch. Note that for
|
||||
some losses, there are multiple elements per sample. If the field :attr:`size_average`
|
||||
|
Reference in New Issue
Block a user