From 7c24a16f8231c1eb4d4ba80fc7f6a279263a5b62 Mon Sep 17 00:00:00 2001 From: Matthew Heidemann Date: Thu, 29 Nov 2018 08:16:29 -0800 Subject: [PATCH] Fixed typo for BCEWithLogitLoss doc comments (#14532) Summary: The math symbol was missing a prefix `:` Pull Request resolved: https://github.com/pytorch/pytorch/pull/14532 Differential Revision: D13256077 Pulled By: soumith fbshipit-source-id: 2359819d8aa664f915be1c436cbb0c0756504028 --- torch/nn/modules/loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/nn/modules/loss.py b/torch/nn/modules/loss.py index 339f948..472bb53 100644 --- a/torch/nn/modules/loss.py +++ b/torch/nn/modules/loss.py @@ -527,7 +527,7 @@ class BCEWithLogitsLoss(_Loss): For example, if a dataset contains 100 positive and 300 negative examples of a single class, then `pos_weight` for the class should be equal to :math:`\frac{300}{100}=3`. - The loss would act as if the dataset contains math:`3\times 100=300` positive examples. + The loss would act as if the dataset contains :math:`3\times 100=300` positive examples. Args: weight (Tensor, optional): a manual rescaling weight given to the loss -- 2.7.4