forked from mit-han-lab/once-for-all
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hubconf.py
23 lines (19 loc) · 1.27 KB
/
hubconf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
dependencies = ['torch', 'torchvision']
from functools import partial
from ofa.model_zoo import ofa_net, ofa_specialized
# general model
ofa_supernet_resnet50 = partial(ofa_net, net_id="ofa_resnet50", pretrained=True)
ofa_supernet_mbv3_w10 = partial(ofa_net, net_id="ofa_mbv3_d234_e346_k357_w1.0", pretrained=True)
ofa_supernet_mbv3_w12 = partial(ofa_net, net_id="ofa_mbv3_d234_e346_k357_w1.2", pretrained=True)
ofa_supernet_proxyless = partial(ofa_net, net_id="ofa_proxyless_d234_e346_k357_w1.3", pretrained=True)
# specialized
resnet50D_MAC_4_1B = partial(ofa_specialized, net_id="[email protected][email protected]")
resnet50D_MAC_3_7B = partial(ofa_specialized, net_id="[email protected][email protected]")
resnet50D_MAC_3_0B = partial(ofa_specialized, net_id="[email protected][email protected]")
resnet50D_MAC_2_4B = partial(ofa_specialized, net_id="[email protected][email protected]")
resnet50D_MAC_1_8B = partial(ofa_specialized, net_id="[email protected][email protected]")
resnet50D_MAC_1_2B = partial(ofa_specialized, net_id="[email protected][email protected]_finetune@25")
resnet50D_MAC_0_9B = partial(ofa_specialized, net_id="[email protected][email protected]_finetune@25")
resnet50D_MAC_0_6B = partial(ofa_specialized, net_id="[email protected][email protected]_finetune@25")
def ofa_specialized_get():
return ofa_specialized