Skip to content

Commit

Permalink
Revert "Enhance training schedule for multi-label classification (#1212
Browse files Browse the repository at this point in the history
…)"

This reverts commit 3dd9207.
  • Loading branch information
JihwanEom authored Aug 25, 2022
1 parent 3dd9207 commit 5f036ac
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
_base_ = [
'../../../submodule/models/classification/ote_efficientnet_b0.yaml',
]

runner = dict(max_epochs=20)
fp16 = dict(loss_scale=512.)
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
_base_ = [
'../../../submodule/models/classification/ote_efficientnet_b0_multilabel.yaml',
]

fp16 = dict(loss_scale=512.)

custom_hooks = [
dict(
type='LazyEarlyStoppingHook',
start=0,
patience=10,
iteration_patience=0,
metric='mAP',
interval=1,
priority=75,
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ hyper_parameters:
learning_rate:
default_value: 0.007
auto_hpo_state: POSSIBLE
learning_rate_warmup_iters:
default_value: 0
num_iters:
default_value: 90
default_value: 20
algo_backend:
train_type:
default_value: Incremental
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
_base_ = [
'../../../submodule/models/classification/ote_efficientnet_v2_s.yaml',
]

runner = dict(max_epochs=20)
fp16 = dict(loss_scale=512.)
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
_base_ = [
'../../../submodule/models/classification/ote_efficientnet_v2_s_multilabel.yaml',
]

fp16 = dict(loss_scale=512.)

custom_hooks = [
dict(
type='LazyEarlyStoppingHook',
start=0,
patience=10,
iteration_patience=0,
metric='mAP',
interval=1,
priority=75,
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ hyper_parameters:
learning_rate:
default_value: 0.007
auto_hpo_state: POSSIBLE
learning_rate_warmup_iters:
default_value: 0
num_iters:
default_value: 90
default_value: 20
algo_backend:
train_type:
default_value: Incremental
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
_base_ = [
'../../../submodule/models/classification/ote_mobilenet_v3_large.yaml',
]

runner = dict(max_epochs=20)
fp16 = dict(loss_scale=512.)
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
_base_ = [
'../../../submodule/models/classification/ote_mobilenet_v3_large_multilabel.yaml',
]

fp16 = dict(loss_scale=512.)

custom_hooks = [
dict(
type='LazyEarlyStoppingHook',
start=0,
patience=10,
iteration_patience=0,
metric='mAP',
interval=1,
priority=75,
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ hyper_parameters:
learning_rate_warmup_iters:
default_value: 100
num_iters:
default_value: 90
default_value: 20
algo_backend:
train_type:
default_value: Incremental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,6 @@ def _init_model_cfg(self):
else:
cfg_path = os.path.join(base_dir, 'model.py')
cfg = MPAConfig.fromfile(cfg_path)

# To initialize different HP according to task / Support HP change via CLI & UI
if not self._multilabel:
template = MPAConfig.fromfile(self.template_file_path)
template_params = template.hyper_parameters.parameter_overrides.learning_parameters
incoming_params = self._hyperparams.learning_parameters
if cfg.get('runner', False) and (template_params.num_iters.default_value != incoming_params.num_iters):
cfg.runner.max_epochs = incoming_params.num_iters

cfg.model.multilabel = self._multilabel
cfg.model.hierarchical = self._hierarchical
if self._hierarchical:
Expand Down

0 comments on commit 5f036ac

Please sign in to comment.