Skip to content

Commit

Permalink
Integrate model.py adaptive hook config --> recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
sungmanc committed Aug 16, 2023
1 parent 52e62c5 commit c71cce7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 18 deletions.
4 changes: 1 addition & 3 deletions src/otx/algorithms/classification/configs/deit_tiny/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@
fp16 = dict(loss_scale=512.0)

optimizer = dict(_delete_=True, type="AdamW", lr=0.01, weight_decay=0.05)
optimizer_config = dict(_delete_=True)

custom_hooks = [dict(type="AdaptiveRepeatDataHook", priority="ABOVE_NORMAL")]
optimizer_config = dict(_delete_=True)
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@
),
)

fp16 = dict(loss_scale=512.0)

custom_hooks = [dict(type="AdaptiveRepeatDataHook", priority="ABOVE_NORMAL")]
fp16 = dict(loss_scale=512.0)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@
head=dict(type="CustomLinearClsHead", loss=dict(type="CrossEntropyLoss", loss_weight=1.0)),
)

fp16 = dict(loss_scale=512.0)

custom_hooks = [dict(type="AdaptiveRepeatDataHook", priority="ABOVE_NORMAL")]
fp16 = dict(loss_scale=512.0)
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
in_channels=720,
hid_channels=1280,
),
)

custom_hooks = [dict(type="AdaptiveRepeatDataHook", priority="ABOVE_NORMAL")]
)
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@
),
)

fp16 = dict(loss_scale=512.0)

custom_hooks = [dict(type="AdaptiveRepeatDataHook", priority="ABOVE_NORMAL")]
fp16 = dict(loss_scale=512.0)
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@
model = dict(
type="CustomImageClassifier",
task="classification",
)

custom_hooks = [dict(type="AdaptiveRepeatDataHook", priority="ABOVE_NORMAL")]
)
8 changes: 8 additions & 0 deletions src/otx/recipes/stages/classification/incremental.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,11 @@ adaptive_validation_interval:
max_interval: 5
enable_adaptive_interval_hook: True
enable_eval_before_run: True


custom_hooks: [
{
type:"AdaptiveRepeatDataHook",
priority:"ABOVE_NORMAL"
}
]

0 comments on commit c71cce7

Please sign in to comment.