Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

str --> string #583

Merged
merged 3 commits into from
May 10, 2018
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
4 changes: 2 additions & 2 deletions chainercv/datasets/directory_parsing_label_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def directory_parsing_label_names(root, numerical_sort=False):
that is used by the dataset to refer the label.

Args:
root (str): The root directory.
root (string): The root directory.
numerical_sort (bool): Label names are sorted numerically.
This means that label :obj:`2` is before label :obj:`10`,
which is not the case when string sort is used.
Expand Down Expand Up @@ -100,7 +100,7 @@ class DirectoryParsingLabelDataset(GetterDataset):
array([0, 0, 1])

Args:
root (str): The root directory.
root (string): The root directory.
check_img_file (callable): A function to determine
if a file should be included in the dataset.
color (bool): If :obj:`True`, this dataset read images
Expand Down
2 changes: 1 addition & 1 deletion chainercv/extensions/vis_report/detection_vis_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class DetectionVisReport(chainer.training.extension.Extension):
Args:
iterator: Iterator object that produces images and ground truth.
target: Link object used for detection.
label_names (iterable of str): Name of labels ordered according
label_names (iterable of strings): Name of labels ordered according
to label ids. If this is :obj:`None`, labels will be skipped.
filename (str): Basename for the saved image. It can contain two
keywords, :obj:`'{iteration}'` and :obj:`'{index}'`. They are
Expand Down
2 changes: 1 addition & 1 deletion chainercv/links/model/faster_rcnn/faster_rcnn_vgg.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FasterRCNNVGG16(FasterRCNN):

Args:
n_fg_class (int): The number of classes excluding the background.
pretrained_model (str): The destination of the pre-trained
pretrained_model (string): The destination of the pre-trained
chainer model serialized as a :obj:`.npz` file.
If this is one of the strings described
above, it automatically loads weights stored under a directory
Expand Down
4 changes: 2 additions & 2 deletions chainercv/links/model/resnet/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ResNet(PickableSequentialChain):
the number of classes used to train the pretrained model
is used. Otherwise, the number of classes in ILSVRC 2012 dataset
is used.
pretrained_model (str): The destination of the pre-trained
pretrained_model (string): The destination of the pre-trained
chainer model serialized as a :obj:`.npz` file.
If this is one of the strings described
above, it automatically loads weights stored under a directory
Expand All @@ -86,7 +86,7 @@ class ResNet(PickableSequentialChain):
convolution kernels.
fc_kwargs (dict): Keyword arguments passed to initialize
the :class:`chainer.links.Linear`.
arch (str): If :obj:`fb`, use Facebook ResNet
arch (string): If :obj:`fb`, use Facebook ResNet
architecture. When :obj:`he`, use the architecture presented
by `the original ResNet paper \
<https://arxiv.org/pdf/1512.03385.pdf>`_.
Expand Down
2 changes: 1 addition & 1 deletion chainercv/links/model/segnet/segnet_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SegNetBasic(chainer.Chain):
Args:
n_class (int): The number of classes. If :obj:`None`, it can
be infered if :obj:`pretrained_model` is given.
pretrained_model (str): The destination of the pretrained
pretrained_model (string): The destination of the pretrained
chainer model serialized as a :obj:`.npz` file.
If this is one of the strings described
above, it automatically loads weights stored under a directory
Expand Down
4 changes: 2 additions & 2 deletions chainercv/links/model/ssd/ssd_vgg16.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class SSD300(SSD):

Args:
n_fg_class (int): The number of classes excluding the background.
pretrained_model (str): The weight file to be loaded.
pretrained_model (string): The weight file to be loaded.
This can take :obj:`'voc0712'`, `filepath` or :obj:`None`.
The default value is :obj:`None`.

Expand Down Expand Up @@ -289,7 +289,7 @@ class SSD512(SSD):

Args:
n_fg_class (int): The number of classes excluding the background.
pretrained_model (str): The weight file to be loaded.
pretrained_model (string): The weight file to be loaded.
This can take :obj:`'voc0712'`, `filepath` or :obj:`None`.
The default value is :obj:`None`.

Expand Down
2 changes: 1 addition & 1 deletion chainercv/links/model/vgg/vgg16.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class VGG16(PickableSequentialChain):
the number of classes used to train the pretrained model
is used. Otherwise, the number of classes in ILSVRC 2012 dataset
is used.
pretrained_model (str): The destination of the pre-trained
pretrained_model (string): The destination of the pre-trained
chainer model serialized as a :obj:`.npz` file.
If this is one of the strings described
above, it automatically loads weights stored under a directory
Expand Down
2 changes: 1 addition & 1 deletion chainercv/links/model/yolo/yolo_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class YOLOv2(YOLOBase):

Args:
n_fg_class (int): The number of classes excluding the background.
pretrained_model (str): The weight file to be loaded.
pretrained_model (string): The weight file to be loaded.
This can take :obj:`'voc0712'`, `filepath` or :obj:`None`.
The default value is :obj:`None`.

Expand Down
2 changes: 1 addition & 1 deletion chainercv/links/model/yolo/yolo_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class YOLOv3(YOLOBase):

Args:
n_fg_class (int): The number of classes excluding the background.
pretrained_model (str): The weight file to be loaded.
pretrained_model (string): The weight file to be loaded.
This can take :obj:`'voc0712'`, `filepath` or :obj:`None`.
The default value is :obj:`None`.

Expand Down
14 changes: 7 additions & 7 deletions chainercv/utils/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ def cached_download(url):
downloading the same file.

Args:
url (str): URL to download from.
url (string): URL to download from.

Returns:
str: Path to the downloaded file.
string: Path to the downloaded file.

"""
cache_root = os.path.join(get_dataset_root(), '_dl_cache')
Expand Down Expand Up @@ -101,10 +101,10 @@ def download_model(url):
it just returns the path without downloading the same file.

Args:
url (str): URL to download from.
url (string): URL to download from.

Returns:
str: Path to the downloaded file.
string: Path to the downloaded file.

"""
root = get_dataset_directory(
Expand All @@ -123,10 +123,10 @@ def extractall(file_path, destination, ext):
This function extracts an archive file to a destination.

Args:
file_path (str): The path of a file to be extracted.
destination (str): A directory path. The archive file
file_path (string): The path of a file to be extracted.
destination (string): A directory path. The archive file
will be extracted under this directory.
ext (str): An extension suffix of the archive file.
ext (string): An extension suffix of the archive file.
This function supports :obj:`'.zip'`, :obj:`'.tar'`,
:obj:`'.gz'` and :obj:`'.tgz'`.

Expand Down
2 changes: 1 addition & 1 deletion chainercv/utils/image/read_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def read_image(path, dtype=np.float32, color=True):
order of the channels is RGB.

Args:
path (str): A path of image file.
path (string): A path of image file.
dtype: The type of array. The default value is :obj:`~numpy.float32`.
color (bool): This option determines the number of channels.
If :obj:`True`, the number of channels is three. In this case,
Expand Down
2 changes: 1 addition & 1 deletion chainercv/utils/image/write_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def write_image(img, path):

Args:
image (~numpy.ndarray): An image to be saved.
path (str): The path of an image file.
path (string): The path of an image file.

"""

Expand Down