Skip to content

Commit 3a28df0

Browse files
committed
fix: minor style mods + default arg changes
1 parent 9f0be86 commit 3a28df0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cellseg_models_pytorch/modules/mlp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Mlp(nn.Module):
1212
def __init__(
1313
self,
1414
in_channels: int,
15-
mlp_ratio: int = 4,
15+
mlp_ratio: int = 2,
1616
activation: str = "star_relu",
1717
dropout: float = 0.0,
1818
bias: bool = False,
@@ -31,7 +31,7 @@ def __init__(
3131
----------
3232
in_channels : int
3333
Number of input features.
34-
mlp_ratio : int, default=4
34+
mlp_ratio : int, default=2
3535
Scaling factor to get the number hidden features from the `in_features`.
3636
activation : str, default="star_relu"
3737
The name of the activation function.
@@ -69,7 +69,7 @@ class MlpBlock(nn.Module):
6969
def __init__(
7070
self,
7171
in_channels: int,
72-
mlp_ratio: int = 4,
72+
mlp_ratio: int = 2,
7373
activation: str = "star_relu",
7474
activation_kwargs: Dict[str, Any] = None,
7575
dropout: float = 0.0,
@@ -85,7 +85,7 @@ def __init__(
8585
----------
8686
in_channels : int
8787
Number of input features.
88-
mlp_ratio : int, default=4
88+
mlp_ratio : int, default=2
8989
Scaling factor to get the number hidden features from the `in_features`.
9090
activation : str, default="star_relu"
9191
The name of the activation function.

cellseg_models_pytorch/modules/patch_embeddings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(
2121
flatten: bool = True,
2222
normalization: str = None,
2323
norm_kwargs: Dict[str, Any] = None,
24-
**kwargs
24+
**kwargs,
2525
) -> None:
2626
"""Patch an image with nn.Conv2d and then embed.
2727
@@ -153,7 +153,7 @@ def __init__(
153153
head_dim: int = 64,
154154
num_heads: int = 8,
155155
normalization: int = None,
156-
**norm_kwargs
156+
**norm_kwargs,
157157
) -> None:
158158
"""Patch an input image and then embed/project.
159159

0 commit comments

Comments
 (0)