Skip to content

Commit

Permalink
Low-shot and full finetuning evals for regnet models
Browse files Browse the repository at this point in the history
Summary: setting up the low-shot 1%, 10% IN1K and Places-{1, 5, 10, 20, 50, 100}% evals + full finetuning on IN1K and places205

Reviewed By: min-xu-ai

Differential Revision: D26102068

fbshipit-source-id: b636e20eb6262ed88af197f7af7af16bf1c69565
  • Loading branch information
prigoyal authored and facebook-github-bot committed Feb 4, 2021
1 parent 8e663f3 commit 7c0872a
Show file tree
Hide file tree
Showing 12 changed files with 231 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ config:
name: regnet_y_128gf
HEAD:
PARAMS: [
["swav_head", {"dims": [7392, 7392], "use_bn": False, "num_clusters": []}],
['mlp', {'dims': [7392, 1000]}]
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [7392, 8192], "num_clusters": []}],
['mlp', {'dims': [8192, 1000]}]
]
# PARAMS: [['mlp', {'dims': [7392, 1000]}]]
SYNC_BN_CONFIG:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ config:
name: regnet_y_16gf
HEAD:
PARAMS: [
["swav_head", {"dims": [3024, 3024], "use_bn": False, "num_clusters": []}],
['mlp', {'dims': [3024, 1000]}]
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [3024, 4096], "num_clusters": []}],
['mlp', {'dims': [4096, 1000]}]
]
DATA:
# to reduce the training time, we use 64img/gpu (16GB machine)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# @package _global_
config:
DATA:
TRAIN:
BATCHSIZE_PER_REPLICA: 8
TEST:
BATCHSIZE_PER_REPLICA: 8
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
depth: 27
w_0: 640
w_a: 230.83
w_m: 2.53
group_width: 373
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [10444, 8192], "num_clusters": []}],
['mlp', {'dims': [8192, 1000]}]
]
# PARAMS: [['mlp', {'dims': [7392, 1000]}]]
SYNC_BN_CONFIG:
CONVERT_BN_TO_SYNC_BN: True
SYNC_BN_TYPE: apex
GROUP_SIZE: 8
DISTRIBUTED:
NUM_NODES: 2 # we can't fit the model on 16GB machine so instead use 2 nodes
INIT_METHOD: tcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @package _global_
config:
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
name: regnet_y_32gf
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [3712, 4096], "num_clusters": []}],
['mlp', {'dims': [4096, 1000]}]
]
DATA:
# to reduce the training time, we use 64img/gpu (16GB machine)
TRAIN:
BATCHSIZE_PER_REPLICA: 64
TEST:
BATCHSIZE_PER_REPLICA: 64
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# @package _global_
config:
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
depth: 20
w_0: 352
w_a: 147.48
w_m: 2.4
group_width: 328
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [4920, 8192], "num_clusters": []}],
['mlp', {'dims': [8192, 1000]}]
]
DATA:
# to reduce the training time, we use 64img/gpu (16GB machine)
TRAIN:
BATCHSIZE_PER_REPLICA: 64
TEST:
BATCHSIZE_PER_REPLICA: 64
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @package _global_
config:
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
name: regnet_y_8gf
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [2016, 4096], "num_clusters": []}],
['mlp', {'dims': [4096, 1000]}]
]
DATA:
# to reduce the training time, we use 64img/gpu (16GB machine)
TRAIN:
BATCHSIZE_PER_REPLICA: 64
TEST:
BATCHSIZE_PER_REPLICA: 64
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# @package _global_
config:
DATA:
TRAIN:
BATCHSIZE_PER_REPLICA: 16
TEST:
BATCHSIZE_PER_REPLICA: 16
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
name: regnet_y_128gf
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [7392, 8192], "num_clusters": []}],
['mlp', {'dims': [8192, 205]}]
]
# PARAMS: [['mlp', {'dims': [7392, 1000]}]]
SYNC_BN_CONFIG:
CONVERT_BN_TO_SYNC_BN: True
SYNC_BN_TYPE: apex
GROUP_SIZE: 8
DISTRIBUTED:
NUM_NODES: 2 # we can't fit the model on 16GB machine so instead use 2 nodes
INIT_METHOD: tcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @package _global_
config:
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
name: regnet_y_16gf
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [3024, 4096], "num_clusters": []}],
['mlp', {'dims': [4096, 205]}]
]
DATA:
# to reduce the training time, we use 64img/gpu (16GB machine)
TRAIN:
BATCHSIZE_PER_REPLICA: 64
TEST:
BATCHSIZE_PER_REPLICA: 64
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# @package _global_
config:
DATA:
TRAIN:
BATCHSIZE_PER_REPLICA: 8
TEST:
BATCHSIZE_PER_REPLICA: 8
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
depth: 27
w_0: 640
w_a: 230.83
w_m: 2.53
group_width: 373
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [10444, 8192], "num_clusters": []}],
['mlp', {'dims': [8192, 205]}]
]
# PARAMS: [['mlp', {'dims': [7392, 1000]}]]
SYNC_BN_CONFIG:
CONVERT_BN_TO_SYNC_BN: True
SYNC_BN_TYPE: apex
GROUP_SIZE: 8
DISTRIBUTED:
NUM_NODES: 2 # we can't fit the model on 16GB machine so instead use 2 nodes
INIT_METHOD: tcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @package _global_
config:
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
name: regnet_y_32gf
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [3712, 4096], "num_clusters": []}],
['mlp', {'dims': [4096, 205]}]
]
DATA:
# to reduce the training time, we use 64img/gpu (16GB machine)
TRAIN:
BATCHSIZE_PER_REPLICA: 64
TEST:
BATCHSIZE_PER_REPLICA: 64
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# @package _global_
config:
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
depth: 20
w_0: 352
w_a: 147.48
w_m: 2.4
group_width: 328
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [4920, 8192], "num_clusters": []}],
['mlp', {'dims': [8192, 205]}]
]
DATA:
# to reduce the training time, we use 64img/gpu (16GB machine)
TRAIN:
BATCHSIZE_PER_REPLICA: 64
TEST:
BATCHSIZE_PER_REPLICA: 64
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @package _global_
config:
MODEL:
TRUNK:
NAME: regnet
TRUNK_PARAMS:
REGNET:
name: regnet_y_8gf
HEAD:
PARAMS: [
["swav_head", {"normalize_feats": False, "skip_last_bn": False, "use_bn": True, "dims": [2016, 4096], "num_clusters": []}],
['mlp', {'dims': [4096, 205]}]
]
DATA:
# to reduce the training time, we use 64img/gpu (16GB machine)
TRAIN:
BATCHSIZE_PER_REPLICA: 64
TEST:
BATCHSIZE_PER_REPLICA: 64

0 comments on commit 7c0872a

Please sign in to comment.