Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion references/depth/stereo/utils/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def forward(self, images: Tensor, vals: Tensor) -> Tensor:
"""
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)
Expand Down
2 changes: 1 addition & 1 deletion test/datasets_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions test/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
3 changes: 1 addition & 2 deletions torchvision/models/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion torchvision/models/detection/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, batch_size_per_image: int, positive_fraction: float) -> None:
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.
Expand Down
2 changes: 1 addition & 1 deletion torchvision/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2123,7 +2123,7 @@ def get_params(alpha: List[float], sigma: List[float], size: List[int]) -> Tenso
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.
Expand Down