Skip to content

Commit

Permalink
[Feature] EfficientNets NoisyStudent & L2. (#1122)
Browse files Browse the repository at this point in the history
* add mvit 21k

* add mvit 21k

* add effnet noisy student

* Revert "add mvit 21k"

This reverts commit f51067c.

* revert mvit pr

* update link and readme

* update readme

* update l2 link

* update link

Co-authored-by: Ezra-Yu <[email protected]>
  • Loading branch information
okotaku and Ezra-Yu authored Nov 21, 2022
1 parent 743ca2d commit 4fb44f8
Show file tree
Hide file tree
Showing 8 changed files with 374 additions and 57 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,10 @@ venv.bak/

# slurm
*.out

# tensorflow
*.tar.gz
checkpoint
model_params.txt
*.ckpt*
results.txt
12 changes: 12 additions & 0 deletions configs/_base_/models/efficientnet_l2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# model settings
model = dict(
type='ImageClassifier',
backbone=dict(type='EfficientNet', arch='l2'),
neck=dict(type='GlobalAveragePooling'),
head=dict(
type='LinearClsHead',
num_classes=1000,
in_channels=5504,
loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
topk=(1, 5),
))
140 changes: 110 additions & 30 deletions configs/efficientnet/README.md

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions configs/efficientnet/efficientnet-l2_8xb32_in1k-475px.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
_base_ = [
'../_base_/models/efficientnet_l2.py',
'../_base_/datasets/imagenet_bs32.py',
'../_base_/schedules/imagenet_bs256.py',
'../_base_/default_runtime.py',
]

# dataset settings
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='EfficientNetRandomCrop', scale=475),
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
dict(type='PackClsInputs'),
]

test_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='EfficientNetCenterCrop', crop_size=475),
dict(type='PackClsInputs'),
]

train_dataloader = dict(dataset=dict(pipeline=train_pipeline))
val_dataloader = dict(dataset=dict(pipeline=test_pipeline))
test_dataloader = dict(dataset=dict(pipeline=test_pipeline))
24 changes: 24 additions & 0 deletions configs/efficientnet/efficientnet-l2_8xb8_in1k.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
_base_ = [
'../_base_/models/efficientnet_l2.py',
'../_base_/datasets/imagenet_bs32.py',
'../_base_/schedules/imagenet_bs256.py',
'../_base_/default_runtime.py',
]

# dataset settings
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='EfficientNetRandomCrop', scale=800),
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
dict(type='PackClsInputs'),
]

test_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='EfficientNetCenterCrop', crop_size=800),
dict(type='PackClsInputs'),
]

train_dataloader = dict(batch_size=8, dataset=dict(pipeline=train_pipeline))
val_dataloader = dict(batch_size=8, dataset=dict(pipeline=test_pipeline))
test_dataloader = dict(batch_size=8, dataset=dict(pipeline=test_pipeline))
Loading

0 comments on commit 4fb44f8

Please sign in to comment.