-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement onnx export for inception3/4, resnext, mobilenetv2 (#346)
* add inceptionv4 backbone/training settings * add converted backbone, top-1 acc 80.08
- Loading branch information
Showing
14 changed files
with
761 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
configs/classification/imagenet/inception/inceptionv4_b32x8_100e.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
_base_ = 'configs/classification/imagenet/inception/inceptionv3_b32x8_100e.py' | ||
|
||
num_classes = 1000 | ||
# model settings | ||
model = dict( | ||
type='Classification', | ||
backbone=dict(type='Inception4', num_classes=num_classes), | ||
head=[ | ||
dict( | ||
type='ClsHead', | ||
with_fc=False, | ||
in_channels=1536, | ||
loss_config=dict( | ||
type='CrossEntropyLossWithLabelSmooth', | ||
label_smooth=0, | ||
), | ||
num_classes=num_classes, | ||
input_feature_index=[1], | ||
), | ||
dict( | ||
type='ClsHead', | ||
with_fc=False, | ||
in_channels=768, | ||
loss_config=dict( | ||
type='CrossEntropyLossWithLabelSmooth', | ||
label_smooth=0, | ||
), | ||
num_classes=num_classes, | ||
input_feature_index=[0], | ||
) | ||
]) | ||
|
||
img_norm_cfg = dict(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) |
46 changes: 46 additions & 0 deletions
46
configs/classification/imagenet/inception/inceptionv4_b32x8_200e_rmsprop.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# A config with the optimization settings from https://arxiv.org/pdf/1602.07261 | ||
# May run with 20 GPUs | ||
_base_ = 'configs/classification/imagenet/inception/inceptionv3_b32x8_100e.py' | ||
|
||
num_classes = 1000 | ||
# model settings | ||
model = dict( | ||
type='Classification', | ||
backbone=dict(type='Inception4', num_classes=num_classes), | ||
head=[ | ||
dict( | ||
type='ClsHead', | ||
with_fc=False, | ||
in_channels=1536, | ||
loss_config=dict( | ||
type='CrossEntropyLossWithLabelSmooth', | ||
label_smooth=0, | ||
), | ||
num_classes=num_classes, | ||
input_feature_index=[1], | ||
), | ||
dict( | ||
type='ClsHead', | ||
with_fc=False, | ||
in_channels=768, | ||
loss_config=dict( | ||
type='CrossEntropyLossWithLabelSmooth', | ||
label_smooth=0, | ||
), | ||
num_classes=num_classes, | ||
input_feature_index=[0], | ||
) | ||
]) | ||
|
||
img_norm_cfg = dict(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) | ||
|
||
# optimizer | ||
optimizer = dict( | ||
type='RMSprop', lr=0.045, momentum=0.9, weight_decay=0.9, eps=1.0) | ||
|
||
# learning policy | ||
lr_config = dict(policy='exp', gamma=0.96954) # gamma**2 ~ 0.94 | ||
checkpoint_config = dict(interval=10) | ||
|
||
# runtime settings | ||
total_epochs = 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.