Skip to content

Commit 1163d64

Browse files
committed
resnet hp fix
1 parent b10e3de commit 1163d64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

labml_nn/resnet/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def __init__(self, n_blocks: List[int], n_channels: List[int],
273273
# Initial convolution layer maps from `img_channels` to number of channels in the first
274274
# residual block (`n_channels[0]`)
275275
self.conv = nn.Conv2d(img_channels, n_channels[0],
276-
kernel_size=first_kernel_size, stride=1, padding=first_kernel_size // 2)
276+
kernel_size=first_kernel_size, stride=2, padding=first_kernel_size // 2)
277277
# Batch norm after initial convolution
278278
self.bn = nn.BatchNorm2d(n_channels[0])
279279

labml_nn/resnet/experiment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Configs(CIFAR10Configs):
3434
# Bottleneck sizes
3535
bottlenecks: Optional[List[int]] = None
3636
# Kernel size of the initial convolution layer
37-
first_kernel_size: int = 7
37+
first_kernel_size: int = 3
3838

3939

4040
@option(Configs.model)

0 commit comments

Comments
 (0)