Skip to content

Commit

Permalink
Fix: Fix misusage of mmcls and the rep error
Browse files Browse the repository at this point in the history
  • Loading branch information
MILK-BIOS authored and Pillar1989 committed Jul 17, 2024
1 parent f36da11 commit 35a3862
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
neck=dict(type='sscma.GlobalAveragePooling'),
head=dict(
type='sscma.LinearClsHead',
in_channels=32,
in_channels=16,
loss=dict(type='sscma.CrossEntropyLoss', loss_weight=1.0),
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
neck=dict(type='sscma.GlobalAveragePooling'),
head=dict(
type='sscma.LinearClsHead',
in_channels=32,
in_channels=16,
loss=dict(type='sscma.CrossEntropyLoss', loss_weight=1.0),
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
neck=dict(type='sscma.GlobalAveragePooling', dim=2),
head=dict(
type='sscma.LinearClsHead',
in_channels=32,
in_channels=16,
loss=dict(type='sscma.CrossEntropyLoss', loss_weight=1.0),
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
neck=dict(type='sscma.GlobalAveragePooling'),
head=dict(
type='sscma.LinearClsHead',
in_channels=32,
in_channels=16,
loss=dict(type='sscma.CrossEntropyLoss', loss_weight=1.0),
),
)
Expand Down
2 changes: 1 addition & 1 deletion configs/classification/mobnetv2_0.35_rep_1bx16_300e_vww.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
neck=dict(type='sscma.GlobalAveragePooling'),
head=dict(
type='sscma.LinearClsHead',
in_channels=64,
in_channels=32,
num_classes=num_classes,
loss=dict(type='sscma.CrossEntropyLoss', loss_weight=1.0),
topk=(1, 5),
Expand Down
2 changes: 2 additions & 0 deletions configs/classification/mobnetv2_1.0_1bx16_300e_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
data_prefix=train_data,
pipeline=train_pipeline,
),
async_load=True,
)

val_dataloader = dict(
Expand All @@ -68,6 +69,7 @@
data_prefix=val_data,
pipeline=test_pipeline,
),
async_load=True,
)

test_dataloader = val_dataloader
6 changes: 3 additions & 3 deletions configs/swift_yolo/swift_yolo_mb2_1xb16_300e_coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
type='YOLOv5PAFPN',
deepen_factor=deepen_factor,
widen_factor=widen_factor,
in_channels=[32, 48, 112],
out_channels=[32, 48, 112],
in_channels=[32, 48, 160],
out_channels=[32, 48, 160],
num_csp_blocks=1,
norm_cfg=norm_cfg,
act_cfg=dict(type='ReLU', inplace=True),
Expand All @@ -140,7 +140,7 @@
head_module=dict(
type='sscma.DetHead',
num_classes=num_classes,
in_channels=[32, 48, 112],
in_channels=[32, 48, 160],
widen_factor=widen_factor,
featmap_strides=strides,
num_base_priors=3,
Expand Down
1 change: 0 additions & 1 deletion sscma/engine/hooks/visualization_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import mmcv
import mmengine
import mmengine.fileio as fileio
from mmcls.structures import ClsDataSample
from mmdet.engine.hooks import DetVisualizationHook
from mmengine.fileio import join_path
from mmengine.hooks import Hook
Expand Down

0 comments on commit 35a3862

Please sign in to comment.