Skip to content

Commit

Permalink
fixes to squeeze excite and stochastic depth
Browse files Browse the repository at this point in the history
  • Loading branch information
Raahul-Singh committed Oct 29, 2023
1 parent 0ba8289 commit 2dce68d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metnet/layers/SqueezeExcitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def forward(self, X: torch.Tensor) -> torch.Tensor:
torch.Tensor
Output Tensor
"""
x_se = X.mean((2, 3), keepdim=True)
x_se = X.mean((2, 3), keepdim=True) # Mean along H, W dim
x_se = self.conv_reduce(x_se)
x_se = self.act1(x_se)
x_se = self.conv_expand(x_se)
Expand Down
2 changes: 1 addition & 1 deletion metnet/layers/StochasticDepth.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, drop_prob: float = 0.0) -> None:
probability to drop the network path, by default 0.0
"""
super().__init__()
assert 0 < drop_prob < 1.0
assert 0 <= drop_prob <= 1.0
self.drop_prob = drop_prob

def forward(self, X: torch.Tensor) -> torch.Tensor:
Expand Down

0 comments on commit 2dce68d

Please sign in to comment.