Skip to content

Commit

Permalink
[fix] Add and correct docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
daidaiershidi committed Sep 19, 2022
1 parent fbf1e11 commit 2ee92b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mmselfsup/datasets/pipelines/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,10 @@ class MaskfeatMaskGenerator(object):
min_num_patches (int): Minimum number of patches that require masking.
Defaults to 15.
max_num_patches (int, optional): Maximum number of patches that
require masking.
require masking. Defaults to None.
min_aspect (int): Minimum aspect of patches. Defaults to 0.3.
max_aspect (float, optional): Maximum aspect of patches.
Defaults to None.
"""

def __init__(
Expand Down
4 changes: 4 additions & 0 deletions mmselfsup/models/algorithms/maskfeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class MaskFeat(BaseModel):
backbone (dict): Config dict for encoder. Defaults to None.
head (dict): Config dict for loss functions. Defaults to None.
hog_para (dict): Config dict for hog layer. Defaults to None.
dict['nbins', int]: Number of bin. Defaults to 9.
dict['pool', float]: Number of cell. Defaults to 8.
dict['gaussian_window', int]: Size of gaussian kernel.
Defaults to 16.
init_cfg (dict): Config dict for weight initialization.
Defaults to None.
"""
Expand Down
4 changes: 2 additions & 2 deletions mmselfsup/models/heads/maskfeat_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ class MaskFeatPretrainHead(BaseModule):
embed_dim (int): The dim of the feature before the classifier head.
Defaults to 768.
hog_dim (int): The dim of the hog feature. Defaults to 108.
reduction (str): Specifies reduction to apply to the output.
Defaults to "mean" (default) or "none".
"""

def __init__(self, embed_dim: int = 768, hog_dim: int = 108) -> None:
Expand Down Expand Up @@ -73,6 +71,8 @@ class MaskFeatFinetuneHead(BaseModule):
Args:
embed_dim (int): The dim of the feature before the classifier head.
num_classes (int): The total classes. Defaults to 1000.
label_smooth_val (float): The degree of label smoothing.
Defaults to 0.1.
"""

def __init__(self,
Expand Down

0 comments on commit 2ee92b9

Please sign in to comment.