From 9a22475fdb289c9c15eb93466e4cb5aabb7fe8e9 Mon Sep 17 00:00:00 2001 From: HowToSD Date: Thu, 20 Mar 2025 21:50:54 -0700 Subject: [PATCH] Fixed the docstring for Huber and SmoothL1 loss --- docs/reference/node_reference.md | 4 ++-- docs/reference/ptn_bce_loss.md | 2 +- docs/reference/ptn_bce_with_logits_loss.md | 2 +- docs/reference/ptn_cross_entropy_loss.md | 2 +- docs/reference/ptn_huber_loss.md | 2 +- docs/reference/ptn_kl_div_loss.md | 2 +- docs/reference/ptn_l1_loss.md | 2 +- docs/reference/ptn_mse_loss.md | 2 +- docs/reference/ptn_nll_loss.md | 2 +- docs/reference/ptn_smooth_l1_loss.md | 2 +- modules/pytorch_wrapper/ptn_huber_loss.py | 1 - modules/pytorch_wrapper/ptn_smooth_l1_loss.py | 1 - 12 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/reference/node_reference.md b/docs/reference/node_reference.md index ecb0a63..0be6173 100644 --- a/docs/reference/node_reference.md +++ b/docs/reference/node_reference.md @@ -117,12 +117,12 @@ | [Ptn BCE Loss](ptn_bce_loss.md) | A class to compute the binary cross entropy loss. | | [Ptn BCE With Logits Loss](ptn_bce_with_logits_loss.md) | A class to compute the sigmoid then binary cross entropy loss. | | [Ptn Cross Entropy Loss](ptn_cross_entropy_loss.md) | A class to compute the cross entropy loss. | -| [Ptn Huber Loss](ptn_huber_loss.md) | | +| [Ptn Huber Loss](ptn_huber_loss.md) | A class to compute the Huber loss. | | [Ptn KL Div Loss](ptn_kl_div_loss.md) | A class to compute the KL divergence loss. | | [Ptn L1 Loss](ptn_l1_loss.md) | A class to compute the L1 loss. | | [Ptn MSE Loss](ptn_mse_loss.md) | A class to compute the squared loss. | | [Ptn NLL Loss](ptn_nll_loss.md) | A model to compute the negative log likelihood (NLL) loss. | -| [Ptn Smooth L1 Loss](ptn_smooth_l1_loss.md) | | +| [Ptn Smooth L1 Loss](ptn_smooth_l1_loss.md) | A class to compute the Smooth L1 loss. | ## PyTorch wrapper - Math operations | Node | Description | | --- | --- | diff --git a/docs/reference/ptn_bce_loss.md b/docs/reference/ptn_bce_loss.md index 7e1a432..9cbbbe3 100644 --- a/docs/reference/ptn_bce_loss.md +++ b/docs/reference/ptn_bce_loss.md @@ -12,7 +12,7 @@ Unlike the Ptn BCE Loss With Logits node, which takes logits as input, this node ## Input | Name | Data type | |---|---| -| reduction | Mean | +| reduction | | ## Output | Data type | diff --git a/docs/reference/ptn_bce_with_logits_loss.md b/docs/reference/ptn_bce_with_logits_loss.md index 652d542..605a2f3 100644 --- a/docs/reference/ptn_bce_with_logits_loss.md +++ b/docs/reference/ptn_bce_with_logits_loss.md @@ -10,7 +10,7 @@ A class to compute the sigmoid then binary cross entropy loss. ## Input | Name | Data type | |---|---| -| reduction | Mean | +| reduction | | ## Output | Data type | diff --git a/docs/reference/ptn_cross_entropy_loss.md b/docs/reference/ptn_cross_entropy_loss.md index fe8a00b..e71658f 100644 --- a/docs/reference/ptn_cross_entropy_loss.md +++ b/docs/reference/ptn_cross_entropy_loss.md @@ -12,7 +12,7 @@ Unlike Ptn NLL Loss node which takes log probabilities for input, input to this ## Input | Name | Data type | |---|---| -| reduction | Mean | +| reduction | | ## Output | Data type | diff --git a/docs/reference/ptn_huber_loss.md b/docs/reference/ptn_huber_loss.md index d718fd7..d845235 100644 --- a/docs/reference/ptn_huber_loss.md +++ b/docs/reference/ptn_huber_loss.md @@ -14,7 +14,7 @@ Please see [PyTorch documentation](https://pytorch.org/docs/stable/generated/tor ## Input | Name | Data type | |---|---| -| reduction | Mean | +| reduction | | | delta | Float | ## Output diff --git a/docs/reference/ptn_kl_div_loss.md b/docs/reference/ptn_kl_div_loss.md index 24fbc29..8740296 100644 --- a/docs/reference/ptn_kl_div_loss.md +++ b/docs/reference/ptn_kl_div_loss.md @@ -14,7 +14,7 @@ A class to compute the KL divergence loss. ## Input | Name | Data type | |---|---| -| reduction | None | +| reduction | | | log_target | Boolean | ## Output diff --git a/docs/reference/ptn_l1_loss.md b/docs/reference/ptn_l1_loss.md index 1fc8073..121f546 100644 --- a/docs/reference/ptn_l1_loss.md +++ b/docs/reference/ptn_l1_loss.md @@ -10,7 +10,7 @@ A class to compute the L1 loss. ## Input | Name | Data type | |---|---| -| reduction | Mean | +| reduction | | ## Output | Data type | diff --git a/docs/reference/ptn_mse_loss.md b/docs/reference/ptn_mse_loss.md index 6668235..b22c31a 100644 --- a/docs/reference/ptn_mse_loss.md +++ b/docs/reference/ptn_mse_loss.md @@ -10,7 +10,7 @@ A class to compute the squared loss. ## Input | Name | Data type | |---|---| -| reduction | Mean | +| reduction | | ## Output | Data type | diff --git a/docs/reference/ptn_nll_loss.md b/docs/reference/ptn_nll_loss.md index ec0a11a..e95fa78 100644 --- a/docs/reference/ptn_nll_loss.md +++ b/docs/reference/ptn_nll_loss.md @@ -12,7 +12,7 @@ Unlike Ptn Cross Entropy which takes input in logits, input to this nodes needs ## Input | Name | Data type | |---|---| -| reduction | Mean | +| reduction | | ## Output | Data type | diff --git a/docs/reference/ptn_smooth_l1_loss.md b/docs/reference/ptn_smooth_l1_loss.md index d591879..e18a99b 100644 --- a/docs/reference/ptn_smooth_l1_loss.md +++ b/docs/reference/ptn_smooth_l1_loss.md @@ -14,7 +14,7 @@ Please see [PyTorch documentation](https://pytorch.org/docs/stable/generated/tor ## Input | Name | Data type | |---|---| -| reduction | Mean | +| reduction | | | beta | Float | ## Output diff --git a/modules/pytorch_wrapper/ptn_huber_loss.py b/modules/pytorch_wrapper/ptn_huber_loss.py index ddacc58..e6014d4 100644 --- a/modules/pytorch_wrapper/ptn_huber_loss.py +++ b/modules/pytorch_wrapper/ptn_huber_loss.py @@ -6,7 +6,6 @@ import torch.nn as nn class PtnHuberLoss: """ Ptn Huber Loss: - A class to compute the Huber loss. Please see [PyTorch documentation](https://pytorch.org/docs/stable/generated/torch.nn.HuberLoss.html) for details. diff --git a/modules/pytorch_wrapper/ptn_smooth_l1_loss.py b/modules/pytorch_wrapper/ptn_smooth_l1_loss.py index b6b75ab..bd4976b 100644 --- a/modules/pytorch_wrapper/ptn_smooth_l1_loss.py +++ b/modules/pytorch_wrapper/ptn_smooth_l1_loss.py @@ -6,7 +6,6 @@ import torch.nn as nn class PtnSmoothL1Loss: """ Ptn Smooth L1 Loss: - A class to compute the Smooth L1 loss. Please see [PyTorch documentation](https://pytorch.org/docs/stable/generated/torch.nn.SmoothL1Loss.html) for details and exact formulation.