Unverified Commit 0dceac02 authored by Sergii Dymchenko's avatar Sergii Dymchenko Committed by GitHub
Browse files

Fix non-existing parameters in docstrings (#7025)

parent 93723b48
......@@ -275,7 +275,7 @@ class SmoothnessLoss(nn.Module):
"""
Args:
images: tensor of shape (D1, D2, ..., DN, C, H, W)
depths: tensor of shape (D1, D2, ..., DN, 1, H, W)
vals: tensor of shape (D1, D2, ..., DN, 1, H, W)
Returns:
smoothness loss of shape (D1, D2, ..., DN)
......
......@@ -951,7 +951,7 @@ def create_random_string(length: int, *digits: str) -> str:
Args:
length (int): Number of characters in the generated string.
*characters (str): Characters to sample from. If omitted defaults to :attr:`string.ascii_lowercase`.
*digits (str): Characters to sample from. If omitted defaults to :attr:`string.ascii_lowercase`.
"""
if not digits:
digits = string.ascii_lowercase
......
......@@ -585,8 +585,9 @@ class TestNMS:
def _reference_nms(self, boxes, scores, iou_threshold):
"""
Args:
box_scores (N, 5): boxes in corner-form and probabilities.
iou_threshold: intersection over union threshold.
boxes: boxes in corner-form
scores: probabilities
iou_threshold: intersection over union threshold
Returns:
picked: a list of indexes of the kept boxes
"""
......
......@@ -117,7 +117,7 @@ def get_weight(name: str) -> WeightsEnum:
def get_model_weights(name: Union[Callable, str]) -> WeightsEnum:
"""
Retuns the weights enum class associated to the given model.
Returns the weights enum class associated to the given model.
.. betastatus:: function
......@@ -137,7 +137,6 @@ def _get_enum_from_fn(fn: Callable) -> WeightsEnum:
Args:
fn (Callable): The builder method used to create the model.
weight_name (str): The name of the weight enum entry of the specific model.
Returns:
WeightsEnum: The requested weight enum.
"""
......
......@@ -25,7 +25,7 @@ class BalancedPositiveNegativeSampler:
def __call__(self, matched_idxs: List[Tensor]) -> Tuple[List[Tensor], List[Tensor]]:
"""
Args:
matched idxs: list of tensors containing -1, 0 or positive values.
matched_idxs: list of tensors containing -1, 0 or positive values.
Each tensor corresponds to a specific image.
-1 values are ignored, 0 are considered as negatives and > 0 as
positives.
......
......@@ -2123,7 +2123,7 @@ class ElasticTransform(torch.nn.Module):
def forward(self, tensor: Tensor) -> Tensor:
"""
Args:
img (PIL Image or Tensor): Image to be transformed.
tensor (PIL Image or Tensor): Image to be transformed.
Returns:
PIL Image or Tensor: Transformed image.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment