Unverified Commit 3d60f498 authored by Samuel Marks's avatar Samuel Marks Committed by GitHub
Browse files

[*.py] Rename "Arguments:" to "Args:" (#3203)


Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
parent ca6fdd6d
...@@ -27,7 +27,7 @@ def deform_conv2d( ...@@ -27,7 +27,7 @@ def deform_conv2d(
`Deformable Convolutional Networks `Deformable Convolutional Networks
<https://arxiv.org/abs/1703.06211>`__ if :attr:`mask` is ``None``. <https://arxiv.org/abs/1703.06211>`__ if :attr:`mask` is ``None``.
Arguments: Args:
input (Tensor[batch_size, in_channels, in_height, in_width]): input tensor input (Tensor[batch_size, in_channels, in_height, in_width]): input tensor
offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width, offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width,
out_height, out_width]): offsets to be applied for each position in the out_height, out_width]): offsets to be applied for each position in the
...@@ -154,7 +154,7 @@ class DeformConv2d(nn.Module): ...@@ -154,7 +154,7 @@ class DeformConv2d(nn.Module):
def forward(self, input: Tensor, offset: Tensor, mask: Tensor = None) -> Tensor: def forward(self, input: Tensor, offset: Tensor, mask: Tensor = None) -> Tensor:
""" """
Arguments: Args:
input (Tensor[batch_size, in_channels, in_height, in_width]): input tensor input (Tensor[batch_size, in_channels, in_height, in_width]): input tensor
offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width, offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width,
out_height, out_width]): offsets to be applied for each position in the out_height, out_width]): offsets to be applied for each position in the
......
...@@ -10,7 +10,7 @@ class ExtraFPNBlock(nn.Module): ...@@ -10,7 +10,7 @@ class ExtraFPNBlock(nn.Module):
""" """
Base class for the extra block in the FPN. Base class for the extra block in the FPN.
Arguments: Args:
results (List[Tensor]): the result of the FPN results (List[Tensor]): the result of the FPN
x (List[Tensor]): the original feature maps x (List[Tensor]): the original feature maps
names (List[str]): the names for each one of the names (List[str]): the names for each one of the
...@@ -41,7 +41,7 @@ class FeaturePyramidNetwork(nn.Module): ...@@ -41,7 +41,7 @@ class FeaturePyramidNetwork(nn.Module):
The input to the model is expected to be an OrderedDict[Tensor], containing The input to the model is expected to be an OrderedDict[Tensor], containing
the feature maps on top of which the FPN will be added. the feature maps on top of which the FPN will be added.
Arguments: Args:
in_channels_list (list[int]): number of channels for each feature map that in_channels_list (list[int]): number of channels for each feature map that
is passed to the module is passed to the module
out_channels (int): number of channels of the FPN representation out_channels (int): number of channels of the FPN representation
...@@ -134,7 +134,7 @@ class FeaturePyramidNetwork(nn.Module): ...@@ -134,7 +134,7 @@ class FeaturePyramidNetwork(nn.Module):
""" """
Computes the FPN for a set of feature maps. Computes the FPN for a set of feature maps.
Arguments: Args:
x (OrderedDict[Tensor]): feature maps for each feature level. x (OrderedDict[Tensor]): feature maps for each feature level.
Returns: Returns:
......
...@@ -13,7 +13,7 @@ def sigmoid_focal_loss( ...@@ -13,7 +13,7 @@ def sigmoid_focal_loss(
Original implementation from https://github.com/facebookresearch/fvcore/blob/master/fvcore/nn/focal_loss.py . Original implementation from https://github.com/facebookresearch/fvcore/blob/master/fvcore/nn/focal_loss.py .
Loss used in RetinaNet for dense detection: https://arxiv.org/abs/1708.02002. Loss used in RetinaNet for dense detection: https://arxiv.org/abs/1708.02002.
Arguments: Args:
inputs: A float tensor of arbitrary shape. inputs: A float tensor of arbitrary shape.
The predictions for each example. The predictions for each example.
targets: A float tensor with the same shape as inputs. Stores the binary targets: A float tensor with the same shape as inputs. Stores the binary
......
...@@ -45,7 +45,7 @@ class LevelMapper(object): ...@@ -45,7 +45,7 @@ class LevelMapper(object):
"""Determine which FPN level each RoI in a set of RoIs should map to based """Determine which FPN level each RoI in a set of RoIs should map to based
on the heuristic in the FPN paper. on the heuristic in the FPN paper.
Arguments: Args:
k_min (int) k_min (int)
k_max (int) k_max (int)
canonical_scale (int) canonical_scale (int)
...@@ -69,7 +69,7 @@ class LevelMapper(object): ...@@ -69,7 +69,7 @@ class LevelMapper(object):
def __call__(self, boxlists: List[Tensor]) -> Tensor: def __call__(self, boxlists: List[Tensor]) -> Tensor:
""" """
Arguments: Args:
boxlists (list[BoxList]) boxlists (list[BoxList])
""" """
# Compute level ids # Compute level ids
...@@ -87,7 +87,7 @@ class MultiScaleRoIAlign(nn.Module): ...@@ -87,7 +87,7 @@ class MultiScaleRoIAlign(nn.Module):
It infers the scale of the pooling via the heuristics present in the FPN paper. It infers the scale of the pooling via the heuristics present in the FPN paper.
Arguments: Args:
featmap_names (List[str]): the names of the feature maps that will be used featmap_names (List[str]): the names of the feature maps that will be used
for the pooling. for the pooling.
output_size (List[Tuple[int, int]] or List[int]): output size for the pooled region output_size (List[Tuple[int, int]] or List[int]): output size for the pooled region
...@@ -182,7 +182,7 @@ class MultiScaleRoIAlign(nn.Module): ...@@ -182,7 +182,7 @@ class MultiScaleRoIAlign(nn.Module):
image_shapes: List[Tuple[int, int]], image_shapes: List[Tuple[int, int]],
) -> Tensor: ) -> Tensor:
""" """
Arguments: Args:
x (OrderedDict[Tensor]): feature maps for each level. They are assumed to have x (OrderedDict[Tensor]): feature maps for each level. They are assumed to have
all the same number of channels, but they can have different sizes. all the same number of channels, but they can have different sizes.
boxes (List[Tensor[N, 4]]): boxes to be used to perform the pooling operation, in boxes (List[Tensor[N, 4]]): boxes to be used to perform the pooling operation, in
......
...@@ -18,7 +18,7 @@ def ps_roi_align( ...@@ -18,7 +18,7 @@ def ps_roi_align(
Performs Position-Sensitive Region of Interest (RoI) Align operator Performs Position-Sensitive Region of Interest (RoI) Align operator
mentioned in Light-Head R-CNN. mentioned in Light-Head R-CNN.
Arguments: Args:
input (Tensor[N, C, H, W]): input tensor input (Tensor[N, C, H, W]): input tensor
boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2) boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2)
format where the regions will be taken from. If a single Tensor is passed, format where the regions will be taken from. If a single Tensor is passed,
......
...@@ -17,7 +17,7 @@ def ps_roi_pool( ...@@ -17,7 +17,7 @@ def ps_roi_pool(
Performs Position-Sensitive Region of Interest (RoI) Pool operator Performs Position-Sensitive Region of Interest (RoI) Pool operator
described in R-FCN described in R-FCN
Arguments: Args:
input (Tensor[N, C, H, W]): input tensor input (Tensor[N, C, H, W]): input tensor
boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2) boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2)
format where the regions will be taken from. If a single Tensor is passed, format where the regions will be taken from. If a single Tensor is passed,
......
...@@ -19,7 +19,7 @@ def roi_align( ...@@ -19,7 +19,7 @@ def roi_align(
""" """
Performs Region of Interest (RoI) Align operator described in Mask R-CNN Performs Region of Interest (RoI) Align operator described in Mask R-CNN
Arguments: Args:
input (Tensor[N, C, H, W]): input tensor input (Tensor[N, C, H, W]): input tensor
boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2) boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2)
format where the regions will be taken from. If a single Tensor is passed, format where the regions will be taken from. If a single Tensor is passed,
......
...@@ -17,7 +17,7 @@ def roi_pool( ...@@ -17,7 +17,7 @@ def roi_pool(
""" """
Performs Region of Interest (RoI) Pool operator described in Fast R-CNN Performs Region of Interest (RoI) Pool operator described in Fast R-CNN
Arguments: Args:
input (Tensor[N, C, H, W]): input tensor input (Tensor[N, C, H, W]): input tensor
boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2) boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2)
format where the regions will be taken from. If a single Tensor is passed, format where the regions will be taken from. If a single Tensor is passed,
......
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