Skip to content

Commit 8e5ff86

Browse files
author
Severin Magel
committed
removing unecessary typing annotations in docstring
1 parent 43dc067 commit 8e5ff86

1 file changed

Lines changed: 27 additions & 33 deletions

File tree

src/graphnet/models/cnn/lcsc.py

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,18 @@ def __init__(
6666
"""Initialize the Lightning CNN signal classifier (LCSC).
6767
6868
Args:
69-
num_input_features (int): Number of input features.
70-
out_put_dim (int): Number of output dimensions of final MLP.
69+
num_input_features: Number of input features.
70+
out_put_dim: Number of output dimensions of final MLP.
7171
Defaults to 2.
72-
input_norm (bool): Whether to apply normalization to the input.
72+
input_norm: Whether to apply normalization to the input.
7373
Defaults to True.
74-
num_conv_layers (int): Number of convolutional layers.
74+
num_conv_layers: Number of convolutional layers.
7575
Defaults to 8.
76-
conv_filters (List[int]): List of number of convolutional
76+
conv_filters: List of number of convolutional
7777
filters to use in hidden layers.
7878
Defaults to [50, 50, 50, 50, 50, 50, 50, 50, 10].
7979
NOTE needs to have the length of `num_conv_layers`.
80-
kernel_size (int, List[int], or List[List[int]]):
81-
Size of the convolutional kernels.
80+
kernel_size: Size of the convolutional kernels.
8281
Options are:
8382
int: single integer for all dimensions
8483
and all layers,
@@ -91,8 +90,7 @@ def __init__(
9190
for the corresponding layer as kernel size.
9291
NOTE: If a list if passed it needs to have the length
9392
of `num_conv_layers`.
94-
padding (str, int, or List[int]]): Padding for the
95-
convolutional layers.
93+
padding: Padding for the convolutional layers.
9694
Options are:
9795
'Same' for same convolutional padding,
9896
int: single integer for all dimensions and all layers,
@@ -103,8 +101,7 @@ def __init__(
103101
NOTE: If a list is passed it needs to have the length
104102
of `num_conv_layers`.
105103
Defaults to 'Same'.
106-
pooling_type (List[None,str]): List of pooling types
107-
for layers.
104+
pooling_type: List of pooling types for layers.
108105
Options are
109106
None : No pooling is used,
110107
'Avg' : Average pooling is used,
@@ -117,10 +114,10 @@ def __init__(
117114
].
118115
NOTE: the length of the list must be equal to
119116
`num_conv_layers`.
120-
pooling_kernel_size (List[Union[int,List[int]]]):
121-
List of pooling kernel sizes for each layer.
122-
If an integer is provided, it will be used for all layers.
123-
In case of a list the options for its elements are:
117+
pooling_kernel_size: List of pooling kernel sizes for each
118+
layer. If an integer is provided, it will be used for
119+
all layers. In case of a list the options for its
120+
elements are:
124121
list: list of integers for each dimension, e.g. [1, 1, 2].
125122
int: single integer for all dimensions,
126123
e.g. 2 would equal [2, 2, 2].
@@ -133,8 +130,7 @@ def __init__(
133130
None, [2, 2, 2],
134131
None, [2, 2, 2]
135132
].
136-
pooling_stride (int or List[Union[None,int]]):
137-
List of pooling strides for each layer.
133+
pooling_stride: List of pooling strides for each layer.
138134
If an integer is provided, it will be used for all layers.
139135
In case of a list the options for its elements are:
140136
list: list of integers for each dimension, e.g. [1, 1, 2].
@@ -149,20 +145,18 @@ def __init__(
149145
None, [2, 2, 2],
150146
None, [2, 2, 2]
151147
].
152-
num_fc_neurons (int): Number of neurons in the
153-
fully connected layers.
154-
Defaults to 50.
155-
norm_list (bool or List[bool]): Whether to apply normalization
156-
for each convolutional layer.
157-
If a boolean is provided, it will be used for all layers.
158-
Defaults to True.
148+
num_fc_neurons: Number of neurons in the fully connected
149+
layers. Defaults to 50.
150+
norm_list: Whether to apply normalization for each
151+
convolutional layer. If a boolean is provided, it will
152+
be used for all layers. Defaults to True.
159153
NOTE: If a list is passed it needs to have the length
160154
of `num_conv_layers`.
161-
norm_type (str): Type of normalization to use.
155+
norm_type: Type of normalization to use.
162156
Options are 'Batch' or 'Instance'.
163157
Defaults to 'Batch'.
164-
image_size (Tuple[int, int, int]): Size of the input image
165-
in the format (height, width, depth).
158+
image_size: Size of the input image in the format
159+
(height, width, depth).
166160
NOTE: Only needs to be changed if the input image is not
167161
the standard IceCube 86 image size.
168162
"""
@@ -397,23 +391,23 @@ def _calc_output_dimension(
397391
Works for Conv3D, MaxPool3D and AvgPool3D layers.
398392
399393
Args:
400-
dimensions (Tuple[int]): Current dimensions of the input tensor.
394+
dimensions: Current dimensions of the input tensor.
401395
(C,H,W,D) where C is the number of channels,
402396
H is the height, W is the width and D is the depth.
403-
out_channels (int): Number of output channels.
404-
kernel_size (Union[int,List[int]]): Size of the kernel.
397+
out_channels: Number of output channels.
398+
kernel_size: Size of the kernel.
405399
If an integer is provided, it will be used for all dimensions.
406-
padding (Union[int,List[int]]): Padding size.
400+
padding: Padding size.
407401
If an integer is provided, it will be used for all dimensions.
408402
If 'Same', the padding will be calculated to keep the
409403
output size the same as the input size.
410404
Defaults to 0.
411-
stride (Union[int,List[int]]): Stride size.
405+
stride: Stride size.
412406
If an integer is provided, it will be used for all dimensions.
413407
Defaults to 1.
414408
415409
Returns:
416-
Tuple[int]: New dimensions after the layer.
410+
New dimensions after the layer.
417411
418412
NOTE: For the pooling layers, set out_channels equal to the
419413
input channels. Since they do not change the number of channels.

0 commit comments

Comments
 (0)