mirror of
https://github.com/open-mmlab/mmpretrain.git
synced 2025-06-02 22:31:23 +08:00
* add mytrain.py for test * test before layers * test attr in layers * test classifier * delete mytrain.py * add rand_bbox_minmax rand_bbox and cutmix_bbox_and_lam to BaseCutMixLayer * add mixup_prob to BatchMixupLayer * add cutmixup * add cutmixup to __init__ * test classifier with cutmixup * delete some comments * set mixup_prob default to 1.0 * add cutmixup to classifier * use cutmixup * use cutmixup * fix bugs * test cutmixup * move mixup and cutmix to augment * inherit from BaseAugment * add BaseAugment * inherit from BaseAugment * rename identity.py * add @ * build augment * register module * rename to augment.py * delete cutmixup.py * do not inherit from BaseAugment * add augments * use augments in classifier * prob default to 1.0 * add comments * use augments * use augments * assert sum of augmentation probabilities should equal to 1 * augmentation probabilities equal to 1 * calculate Identity prob * replace xxx with self.xxx * add comments * sync with augments * for BC-breaking * delete useless comments in mixup.py
19 lines
549 B
Python
19 lines
549 B
Python
# model settings
|
|
model = dict(
|
|
type='ImageClassifier',
|
|
backbone=dict(
|
|
type='ResNet_CIFAR',
|
|
depth=50,
|
|
num_stages=4,
|
|
out_indices=(3, ),
|
|
style='pytorch'),
|
|
neck=dict(type='GlobalAveragePooling'),
|
|
head=dict(
|
|
type='MultiLabelLinearClsHead',
|
|
num_classes=10,
|
|
in_channels=2048,
|
|
loss=dict(type='CrossEntropyLoss', loss_weight=1.0, use_soft=True)),
|
|
train_cfg=dict(
|
|
augments=dict(type='BatchCutMix', alpha=1.0, num_classes=10,
|
|
prob=1.0)))
|