Skip to content

Commit

Permalink
fix: potential typo in resnet comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwu1227 committed Jul 10, 2023
1 parent e8a5feb commit 1e00077
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions labml_nn/resnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __init__(self, in_channels: int, out_channels: int, stride: int):
self.bn2 = nn.BatchNorm2d(out_channels)

# Shortcut connection should be a projection if the stride length is not $1$
# of if the number of channels change
# or if the number of channels change
if stride != 1 or in_channels != out_channels:
# Projection $W_s x$
self.shortcut = ShortcutProjection(in_channels, out_channels, stride)
Expand Down Expand Up @@ -210,7 +210,7 @@ def __init__(self, in_channels: int, bottleneck_channels: int, out_channels: int
self.bn3 = nn.BatchNorm2d(out_channels)

# Shortcut connection should be a projection if the stride length is not $1$
# of if the number of channels change
# or if the number of channels change
if stride != 1 or in_channels != out_channels:
# Projection $W_s x$
self.shortcut = ShortcutProjection(in_channels, out_channels, stride)
Expand Down

0 comments on commit 1e00077

Please sign in to comment.