Skip to content

Commit 628f7aa

Browse files
authored
Docs: fix unexpected indentation around lists (#1297)
* Docs: fix unexpected indentation around lists Signed-off-by: Adam J. Stewart <ajstewart426@gmail.com> * Possible fix for MAnet Signed-off-by: Adam J. Stewart <ajstewart426@gmail.com> * Possible fix for DeepLabV3+ Signed-off-by: Adam J. Stewart <ajstewart426@gmail.com> --------- Signed-off-by: Adam J. Stewart <ajstewart426@gmail.com>
1 parent 278316e commit 628f7aa

10 files changed

Lines changed: 76 additions & 58 deletions

File tree

segmentation_models_pytorch/decoders/deeplabv3/model.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ class DeepLabV3(SegmentationModel):
4040
upsampling: Final upsampling factor. Default is **None** to preserve input-output spatial shape identity
4141
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
4242
on top of encoder if **aux_params** is not **None** (default). Supported params:
43-
- classes (int): A number of classes
44-
- pooling (str): One of "max", "avg". Default is "avg"
45-
- dropout (float): Dropout factor in [0, 1)
46-
- activation (str): An activation function to apply "sigmoid"/"softmax"
47-
(could be **None** to return logits)
43+
44+
- classes (int): A number of classes
45+
- pooling (str): One of "max", "avg". Default is "avg"
46+
- dropout (float): Dropout factor in [0, 1)
47+
- activation (str): An activation function to apply "sigmoid"/"softmax"
48+
(could be **None** to return logits)
4849
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models.
4950
Keys with ``None`` values are pruned before passing.
5051
@@ -167,11 +168,12 @@ class DeepLabV3Plus(SegmentationModel):
167168
upsampling: Final upsampling factor. Default is 4 to preserve input-output spatial shape identity.
168169
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
169170
on top of encoder if **aux_params** is not **None** (default). Supported params:
170-
- classes (int): A number of classes
171-
- pooling (str): One of "max", "avg". Default is "avg"
172-
- dropout (float): Dropout factor in [0, 1)
173-
- activation (str): An activation function to apply "sigmoid"/"softmax"
174-
(could be **None** to return logits)
171+
172+
- classes (int): A number of classes
173+
- pooling (str): One of "max", "avg". Default is "avg"
174+
- dropout (float): Dropout factor in [0, 1)
175+
- activation (str): An activation function to apply "sigmoid"/"softmax"
176+
(could be **None** to return logits)
175177
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models.
176178
Keys with ``None`` values are pruned before passing.
177179

segmentation_models_pytorch/decoders/fpn/model.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ class FPN(SegmentationModel):
4040
upsampling: Final upsampling factor. Default is 4 to preserve input-output spatial shape identity
4141
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
4242
on top of encoder if **aux_params** is not **None** (default). Supported params:
43-
- classes (int): A number of classes
44-
- pooling (str): One of "max", "avg". Default is "avg"
45-
- dropout (float): Dropout factor in [0, 1)
46-
- activation (str): An activation function to apply "sigmoid"/"softmax"
47-
(could be **None** to return logits)
43+
44+
- classes (int): A number of classes
45+
- pooling (str): One of "max", "avg". Default is "avg"
46+
- dropout (float): Dropout factor in [0, 1)
47+
- activation (str): An activation function to apply "sigmoid"/"softmax"
48+
(could be **None** to return logits)
4849
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models. Keys with ``None`` values are pruned before passing.
4950
5051
Returns:

segmentation_models_pytorch/decoders/linknet/model.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class Linknet(SegmentationModel):
3434
random initialization. The pretrained variant is defined in the encoder name
3535
decoder_use_norm: Specifies normalization between Conv2D and activation.
3636
Accepts the following types:
37+
3738
- **True**: Defaults to `"batchnorm"`.
3839
- **False**: No normalization (`nn.Identity`).
3940
- **str**: Specifies normalization type using default parameters. Available values:
@@ -55,11 +56,12 @@ class Linknet(SegmentationModel):
5556
**callable** and **None**. Default is **None**.
5657
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
5758
on top of encoder if **aux_params** is not **None** (default). Supported params:
58-
- classes (int): A number of classes
59-
- pooling (str): One of "max", "avg". Default is "avg"
60-
- dropout (float): Dropout factor in [0, 1)
61-
- activation (str): An activation function to apply "sigmoid"/"softmax"
62-
(could be **None** to return logits)
59+
60+
- classes (int): A number of classes
61+
- pooling (str): One of "max", "avg". Default is "avg"
62+
- dropout (float): Dropout factor in [0, 1)
63+
- activation (str): An activation function to apply "sigmoid"/"softmax"
64+
(could be **None** to return logits)
6365
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models. Keys with ``None`` values are pruned before passing.
6466
6567
Returns:

segmentation_models_pytorch/decoders/manet/model.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
class MAnet(SegmentationModel):
1616
"""MAnet_ : Multi-scale Attention Net. The MA-Net can capture rich contextual dependencies based on
1717
the attention mechanism, using two blocks:
18-
- Position-wise Attention Block (PAB), which captures the spatial dependencies between pixels in a global view
19-
- Multi-scale Fusion Attention Block (MFAB), which captures the channel dependencies between any feature map by
20-
multi-scale semantic feature fusion
18+
19+
- Position-wise Attention Block (PAB), which captures the spatial dependencies between pixels in a global view
20+
- Multi-scale Fusion Attention Block (MFAB), which captures the channel dependencies between any feature map by
21+
multi-scale semantic feature fusion
2122
2223
Args:
2324
encoder_name: Name of the classification model that will be used as an encoder (a.k.a backbone)
@@ -34,6 +35,7 @@ class MAnet(SegmentationModel):
3435
Length of the list should be the same as **encoder_depth**
3536
decoder_use_norm: Specifies normalization between Conv2D and activation.
3637
Accepts the following types:
38+
3739
- **True**: Defaults to `"batchnorm"`.
3840
- **False**: No normalization (`nn.Identity`).
3941
- **str**: Specifies normalization type using default parameters. Available values:
@@ -59,11 +61,12 @@ class MAnet(SegmentationModel):
5961
**callable** and **None**. Default is **None**.
6062
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
6163
on top of encoder if **aux_params** is not **None** (default). Supported params:
62-
- classes (int): A number of classes
63-
- pooling (str): One of "max", "avg". Default is "avg"
64-
- dropout (float): Dropout factor in [0, 1)
65-
- activation (str): An activation function to apply "sigmoid"/"softmax"
66-
(could be **None** to return logits)
64+
65+
- classes (int): A number of classes
66+
- pooling (str): One of "max", "avg". Default is "avg"
67+
- dropout (float): Dropout factor in [0, 1)
68+
- activation (str): An activation function to apply "sigmoid"/"softmax"
69+
(could be **None** to return logits)
6770
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models. Keys with ``None`` values are pruned before passing.
6871
6972
Returns:

segmentation_models_pytorch/decoders/pan/model.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ class PAN(SegmentationModel):
4343
upsampling: Final upsampling factor. Default is 4 to preserve input-output spatial shape identity
4444
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
4545
on top of encoder if **aux_params** is not **None** (default). Supported params:
46-
- classes (int): A number of classes
47-
- pooling (str): One of "max", "avg". Default is "avg"
48-
- dropout (float): Dropout factor in [0, 1)
49-
- activation (str): An activation function to apply "sigmoid"/"softmax"
50-
(could be **None** to return logits)
46+
47+
- classes (int): A number of classes
48+
- pooling (str): One of "max", "avg". Default is "avg"
49+
- dropout (float): Dropout factor in [0, 1)
50+
- activation (str): An activation function to apply "sigmoid"/"softmax"
51+
(could be **None** to return logits)
5152
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models. Keys with ``None`` values are pruned before passing.
5253
5354
Returns:

segmentation_models_pytorch/decoders/pspnet/model.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class PSPNet(SegmentationModel):
3333
psp_out_channels: A number of filters in Spatial Pyramid
3434
decoder_use_norm: Specifies normalization between Conv2D and activation.
3535
Accepts the following types:
36+
3637
- **True**: Defaults to `"batchnorm"`.
3738
- **False**: No normalization (`nn.Identity`).
3839
- **str**: Specifies normalization type using default parameters. Available values:
@@ -56,11 +57,12 @@ class PSPNet(SegmentationModel):
5657
upsampling: Final upsampling factor. Default is 8 to preserve input-output spatial shape identity
5758
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
5859
on top of encoder if **aux_params** is not **None** (default). Supported params:
59-
- classes (int): A number of classes
60-
- pooling (str): One of "max", "avg". Default is "avg"
61-
- dropout (float): Dropout factor in [0, 1)
62-
- activation (str): An activation function to apply "sigmoid"/"softmax"
63-
(could be **None** to return logits)
60+
61+
- classes (int): A number of classes
62+
- pooling (str): One of "max", "avg". Default is "avg"
63+
- dropout (float): Dropout factor in [0, 1)
64+
- activation (str): An activation function to apply "sigmoid"/"softmax"
65+
(could be **None** to return logits)
6466
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models. Keys with ``None`` values are pruned before passing.
6567
6668
Returns:

segmentation_models_pytorch/decoders/segformer/model.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ class Segformer(SegmentationModel):
3434
upsampling: A number to upsample the output of the model, default is 4 (same size as input)
3535
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
3636
on top of encoder if **aux_params** is not **None** (default). Supported params:
37-
- classes (int): A number of classes
38-
- pooling (str): One of "max", "avg". Default is "avg"
39-
- dropout (float): Dropout factor in [0, 1)
40-
- activation (str): An activation function to apply "sigmoid"/"softmax"
41-
(could be **None** to return logits)
37+
38+
- classes (int): A number of classes
39+
- pooling (str): One of "max", "avg". Default is "avg"
40+
- dropout (float): Dropout factor in [0, 1)
41+
- activation (str): An activation function to apply "sigmoid"/"softmax"
42+
(could be **None** to return logits)
4243
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models. Keys with ``None`` values are pruned before passing.
4344
4445
Returns:

segmentation_models_pytorch/decoders/unet/model.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class Unet(SegmentationModel):
4444
Length of the list should be the same as **encoder_depth**
4545
decoder_use_norm: Specifies normalization between Conv2D and activation.
4646
Accepts the following types:
47+
4748
- **True**: Defaults to `"batchnorm"`.
4849
- **False**: No normalization (`nn.Identity`).
4950
- **str**: Specifies normalization type using default parameters. Available values:
@@ -69,11 +70,12 @@ class Unet(SegmentationModel):
6970
**callable** and **None**. Default is **None**.
7071
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
7172
on top of encoder if **aux_params** is not **None** (default). Supported params:
72-
- classes (int): A number of classes
73-
- pooling (str): One of "max", "avg". Default is "avg"
74-
- dropout (float): Dropout factor in [0, 1)
75-
- activation (str): An activation function to apply "sigmoid"/"softmax"
76-
(could be **None** to return logits)
73+
74+
- classes (int): A number of classes
75+
- pooling (str): One of "max", "avg". Default is "avg"
76+
- dropout (float): Dropout factor in [0, 1)
77+
- activation (str): An activation function to apply "sigmoid"/"softmax"
78+
(could be **None** to return logits)
7779
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models. Keys with ``None`` values are pruned before passing.
7880
7981
Returns:

segmentation_models_pytorch/decoders/unetplusplus/model.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class UnetPlusPlus(SegmentationModel):
3333
Length of the list should be the same as **encoder_depth**
3434
decoder_use_norm: Specifies normalization between Conv2D and activation.
3535
Accepts the following types:
36+
3637
- **True**: Defaults to `"batchnorm"`.
3738
- **False**: No normalization (`nn.Identity`).
3839
- **str**: Specifies normalization type using default parameters. Available values:
@@ -58,11 +59,12 @@ class UnetPlusPlus(SegmentationModel):
5859
**callable** and **None**. Default is **None**.
5960
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
6061
on top of encoder if **aux_params** is not **None** (default). Supported params:
61-
- classes (int): A number of classes
62-
- pooling (str): One of "max", "avg". Default is "avg"
63-
- dropout (float): Dropout factor in [0, 1)
64-
- activation (str): An activation function to apply "sigmoid"/"softmax"
65-
(could be **None** to return logits)
62+
63+
- classes (int): A number of classes
64+
- pooling (str): One of "max", "avg". Default is "avg"
65+
- dropout (float): Dropout factor in [0, 1)
66+
- activation (str): An activation function to apply "sigmoid"/"softmax"
67+
(could be **None** to return logits)
6668
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models. Keys with ``None`` values are pruned before passing.
6769
6870
Returns:

segmentation_models_pytorch/decoders/upernet/model.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class UPerNet(SegmentationModel):
2929
decoder_segmentation_channels: A number of convolution filters in segmentation blocks, default is 64
3030
decoder_use_norm: Specifies normalization between Conv2D and activation.
3131
Accepts the following types:
32+
3233
- **True**: Defaults to `"batchnorm"`.
3334
- **False**: No normalization (`nn.Identity`).
3435
- **str**: Specifies normalization type using default parameters. Available values:
@@ -50,11 +51,12 @@ class UPerNet(SegmentationModel):
5051
**callable** and **None**. Default is **None**.
5152
aux_params: Dictionary with parameters of the auxiliary output (classification head). Auxiliary output is build
5253
on top of encoder if **aux_params** is not **None** (default). Supported params:
53-
- classes (int): A number of classes
54-
- pooling (str): One of "max", "avg". Default is "avg"
55-
- dropout (float): Dropout factor in [0, 1)
56-
- activation (str): An activation function to apply "sigmoid"/"softmax"
57-
(could be **None** to return logits)
54+
55+
- classes (int): A number of classes
56+
- pooling (str): One of "max", "avg". Default is "avg"
57+
- dropout (float): Dropout factor in [0, 1)
58+
- activation (str): An activation function to apply "sigmoid"/"softmax"
59+
(could be **None** to return logits)
5860
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models. Keys with ``None`` values are pruned before passing.
5961
6062
Returns:

0 commit comments

Comments
 (0)