Skip to content

Commit

Permalink
Upd comments style
Browse files Browse the repository at this point in the history
  • Loading branch information
osmr committed Dec 27, 2020
1 parent 6bb8d3d commit af9a7de
Show file tree
Hide file tree
Showing 242 changed files with 1,128 additions and 1,128 deletions.
2 changes: 1 addition & 1 deletion chainer_/chainercv2/model_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ def get_model(name, **kwargs):
name : str
Name of model.
Returns
Returns:
-------
Chain
Resulted model.
Expand Down
8 changes: 4 additions & 4 deletions chainer_/chainercv2/models/centernet.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class CenterNetHeatmapMaxDet(Chain):
"""
CenterNet decoder for heads (heatmap, wh, reg).
Parameters
Parameters:
----------
topk : int, default 40
Keep only `topk` detections.
Expand Down Expand Up @@ -190,7 +190,7 @@ class CenterNet(Chain):
"""
CenterNet model from 'Objects as Points,' https://arxiv.org/abs/1904.07850.
Parameters
Parameters:
----------
backbone : nn.Sequential
Feature extractor.
Expand Down Expand Up @@ -273,7 +273,7 @@ def get_centernet(backbone,
"""
Create CenterNet model with specific parameters.
Parameters
Parameters:
----------
backbone : nn.Sequential
Feature extractor.
Expand All @@ -288,7 +288,7 @@ def get_centernet(backbone,
root : str, default '~/.chainer/models'
Location for keeping the model parameters.
Returns
Returns:
-------
HybridBlock
A network.
Expand Down
8 changes: 4 additions & 4 deletions chainer_/chainercv2/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def round_channels(channels,
divisor : int, default 8
Alignment value.
Returns
Returns:
-------
int
Weighted number of channels.
Expand Down Expand Up @@ -87,7 +87,7 @@ def get_activation_layer(activation):
activation : function or str
Activation function or name of activation function.
Returns
Returns:
-------
function
Activation layer.
Expand Down Expand Up @@ -1150,7 +1150,7 @@ def channel_shuffle(x,
groups : int
Number of groups.
Returns
Returns:
-------
chainer.Variable or numpy.ndarray or cupy.ndarray
Resulted variable.
Expand Down Expand Up @@ -1198,7 +1198,7 @@ def channel_shuffle2(x,
groups : int
Number of groups.
Returns
Returns:
-------
chainer.Variable or numpy.ndarray or cupy.ndarray
Resulted variable.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/chainercv2/models/efficientnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def calc_tf_padding(x,
dilation : int, default 1
Dilation value for convolution layer.
Returns
Returns:
-------
tuple of 4 int
The size of the padding.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/chainercv2/models/fishnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def channel_squeeze(x,
groups : int
Number of groups.
Returns
Returns:
-------
chainer.Variable or numpy.ndarray or cupy.ndarray
Resulted variable.
Expand Down
12 changes: 6 additions & 6 deletions chainer_/chainercv2/models/model_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,14 +582,14 @@ def get_model_file(model_name,
Return location for the pretrained on local file system. This function will download from online model zoo when
model cannot be found or has mismatch. The root directory will be created if it doesn't exist.
Parameters
Parameters:
----------
model_name : str
Name of the model.
local_model_store_dir_path : str, default $CHAINER_HOME/models
Location for keeping the model parameters.
Returns
Returns:
-------
file_path
Path to the requested pretrained model file.
Expand Down Expand Up @@ -634,7 +634,7 @@ def get_model_file(model_name,
def _download(url, path=None, overwrite=False, sha1_hash=None, retries=5, verify_ssl=True):
"""Download an given URL
Parameters
Parameters:
----------
url : str
URL to download
Expand All @@ -651,7 +651,7 @@ def _download(url, path=None, overwrite=False, sha1_hash=None, retries=5, verify
verify_ssl : bool, default True
Verify SSL certificates.
Returns
Returns:
-------
str
The file path of the downloaded file.
Expand Down Expand Up @@ -717,14 +717,14 @@ class requests_failed_to_import(object):
def _check_sha1(filename, sha1_hash):
"""Check whether the sha1 hash of the file content matches the expected hash.
Parameters
Parameters:
----------
filename : str
Path to the file.
sha1_hash : str
Expected sha1 hash in hexadecimal digits.
Returns
Returns:
-------
bool
Whether the file content matches the expected hash.
Expand Down
6 changes: 3 additions & 3 deletions chainer_/chainercv2/models/nasnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self,
x_prev : Tensor
Previous processed tensor.
Returns
Returns:
-------
x_next : Tensor
Next processed tensor.
Expand Down Expand Up @@ -76,7 +76,7 @@ def nasnet_dual_path_scheme_ordinal(block,
x : Tensor
Current processed tensor.
Returns
Returns:
-------
x_next : Tensor
Next processed tensor.
Expand Down Expand Up @@ -180,7 +180,7 @@ def process_with_padding(x,
pad_width : tuple of tuple of int, default ((0, 0), (0, 0), (1, 0), (1, 0))
Whether the layer uses a bias vector.
Returns
Returns:
-------
chainer.Variable or numpy.ndarray or cupy.ndarray
Resulted tensor.
Expand Down
4 changes: 2 additions & 2 deletions chainer_/chainercv2/models/ntsnet_cub.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def hard_nms(cdds,
iou_thresh : float, default 0.25
IoU threshold.
Returns
Returns:
-------
np.array
Filtered borders.
Expand Down Expand Up @@ -252,7 +252,7 @@ def _generate_default_anchor_maps(input_shape=(448, 448)):
input_shape : tuple of 2 int
Input image size.
Returns
Returns:
-------
center_anchors : np.array
anchors * 4 (oy, ox, h, w).
Expand Down
2 changes: 1 addition & 1 deletion chainer_/chainercv2/models/sparsenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def sparsenet_exponential_fetch(lst):
lst : list
List of something.
Returns
Returns:
-------
list
Filtered list.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/chainercv2/models/squeezenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def squeezeresnet_v1_0(**kwargs):

def squeezeresnet_v1_1(**kwargs):
"""
SqueezeNet v1.1 model with residual connections from 'SqueezeNet: AlexNet-level accuracy with 50x fewer parameters
SqueezeNet v1.1 model with residual connections from 'SqueezeNet: AlexNet-level accuracy with 50x fewer Parameters:
and <0.5MB model size,' https://arxiv.org/abs/1602.07360.
Parameters:
Expand Down
4 changes: 2 additions & 2 deletions chainer_/dataset_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def get_dataset_metainfo(dataset_name):
"""
Get dataset metainfo by name of dataset.
Parameters
Parameters:
----------
dataset_name : str
Dataset name.
Returns
Returns:
-------
DatasetMetaInfo
Dataset metainfo.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/ade20k_seg_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ADE20KSegDataset(SegDataset):
"""
ADE20K semantic segmentation dataset.
Parameters
Parameters:
----------
root : str
Path to a folder with `ADEChallengeData2016` subfolder.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/cifar100_cls_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CIFAR100(DatasetMixin):
CIFAR-100 image classification dataset.
Parameters
Parameters:
----------
root : str, default '~/.chainer/datasets/cifar100'
Path to temp folder for storing data.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/cifar10_cls_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CIFAR10(DatasetMixin):
CIFAR-10 image classification dataset.
Parameters
Parameters:
----------
root : str, default '~/.chainer/datasets/cifar10'
Path to temp folder for storing data.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/cityscapes_seg_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CityscapesSegDataset(SegDataset):
"""
Cityscapes semantic segmentation dataset.
Parameters
Parameters:
----------
root : str
Path to a folder with `leftImg8bit` and `gtFine` subfolders.
Expand Down
10 changes: 5 additions & 5 deletions chainer_/datasets/coco_hpe1_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CocoHpe1Dataset(GetterDataset):
"""
COCO keypoint detection (2D single human pose estimation) dataset.
Parameters
Parameters:
----------
root : string
Path to `annotations`, `train2017`, and `val2017` folders.
Expand Down Expand Up @@ -299,7 +299,7 @@ def bbox_clip_xyxy(xyxy, width, height):
All bounding boxes will be clipped to the new region `(0, 0, width, height)`.
Parameters
Parameters:
----------
xyxy : list, tuple or numpy.ndarray
The bbox in format (xmin, ymin, xmax, ymax).
Expand All @@ -310,7 +310,7 @@ def bbox_clip_xyxy(xyxy, width, height):
height : int or float
Boundary height.
Returns
Returns:
-------
tuple or np.array
Description of returned object.
Expand Down Expand Up @@ -339,14 +339,14 @@ def bbox_xywh_to_xyxy(xywh):
"""
Convert bounding boxes from format (xmin, ymin, w, h) to (xmin, ymin, xmax, ymax)
Parameters
Parameters:
----------
xywh : list, tuple or numpy.ndarray
The bbox in format (x, y, w, h).
If numpy.ndarray is provided, we expect multiple bounding boxes with
shape `(N, 4)`.
Returns
Returns:
-------
tuple or np.ndarray
The converted bboxes in format (xmin, ymin, xmax, ymax).
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/coco_hpe2_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CocoHpe2Dataset(GetterDataset):
"""
COCO keypoint detection (2D multiple human pose estimation) dataset.
Parameters
Parameters:
----------
root : string
Path to `annotations`, `train2017`, and `val2017` folders.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/coco_hpe3_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CocoHpe3Dataset(GetterDataset):
"""
COCO keypoint detection (2D multiple human pose estimation) dataset.
Parameters
Parameters:
----------
root : string
Path to `annotations`, `train2017`, and `val2017` folders.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/coco_seg_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CocoSegDataset(SegDataset):
"""
COCO semantic segmentation dataset.
Parameters
Parameters:
----------
root: str
Path to `annotations`, `train2017`, and `val2017` folders.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/cub200_2011_cls_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CUB200_2011(GetterDataset):
"""
CUB-200-2011 fine-grained classification dataset.
Parameters
Parameters:
----------
root : str, default '~/.chainer/datasets/CUB_200_2011'
Path to the folder stored the dataset.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/imagenet1k_cls_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ImageNet1K(DatasetMixin):
"""
ImageNet-1K classification dataset.
Parameters
Parameters:
----------
root : str, default '~/.chainer/datasets/imagenet'
Path to the folder stored the dataset.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/seg_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SegDataset(GetterDataset):
"""
Segmentation base dataset.
Parameters
Parameters:
----------
root : str
Path to data folder.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/svhn_cls_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SVHN(DatasetMixin):
Note: The SVHN dataset assigns the label `10` to the digit `0`. However, in this Dataset,
we assign the label `0` to the digit `0`.
Parameters
Parameters:
----------
root : str, default '~/.chainer/datasets/svhn'
Path to temp folder for storing data.
Expand Down
2 changes: 1 addition & 1 deletion chainer_/datasets/voc_seg_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class VOCSegDataset(SegDataset):
"""
Pascal VOC2012 semantic segmentation dataset.
Parameters
Parameters:
----------
root : str
Path to VOCdevkit folder.
Expand Down
Loading

0 comments on commit af9a7de

Please sign in to comment.