Skip to content

Commit

Permalink
new version of config adapts ResNet
Browse files Browse the repository at this point in the history
  • Loading branch information
aso538 committed Oct 30, 2023
1 parent ed88002 commit a7f576d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions mmpretrain/configs/_base_/schedules/imagenet_bs2048.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) OpenMMLab. All rights reserved.
# This is a BETA new format config file, and the usage may change recently.
from mmengine.optim import LinearLR, MultiStepLR
from torch.optim import SGD

# optimizer
optim_wrapper = dict(
optimizer=dict(
type=SGD, lr=0.8, momentum=0.9, weight_decay=0.0001, nesterov=True))

# learning policy
param_scheduler = [
dict(type=LinearLR, start_factor=0.25, by_epoch=False, begin=0, end=2500),
dict(type=MultiStepLR, by_epoch=True, milestones=[30, 60, 90], gamma=0.1)
]

# train, val, test setting
train_cfg = dict(by_epoch=True, max_epochs=100, val_interval=1)
val_cfg = dict()
test_cfg = dict()

# NOTE: `auto_scale_lr` is for automatically scaling LR,
# based on the actual training batch size.
auto_scale_lr = dict(base_batch_size=2048)

0 comments on commit a7f576d

Please sign in to comment.