Haoxing chen
commited on
Commit
•
201d7dd
1
Parent(s):
8a4bc84
Upload 4 files
Browse files
simclr_2048_e200/20230101_151826.log.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
simclr_2048_e200/latest.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:19a34f0fa0d91b526e03617758c1352c6ef076c8f28ec00e2d8dc96f4bd7e9f6
|
3 |
+
size 224161955
|
simclr_2048_e200/simclr_macl_resnet50_pretrain.py
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
model = dict(
|
2 |
+
type='SimCLR',
|
3 |
+
backbone=dict(
|
4 |
+
type='ResNet',
|
5 |
+
depth=50,
|
6 |
+
in_channels=3,
|
7 |
+
out_indices=[4],
|
8 |
+
norm_cfg=dict(type='SyncBN'),
|
9 |
+
zero_init_residual=True),
|
10 |
+
neck=dict(
|
11 |
+
type='NonLinearNeck',
|
12 |
+
in_channels=2048,
|
13 |
+
hid_channels=2048,
|
14 |
+
out_channels=128,
|
15 |
+
num_layers=2,
|
16 |
+
with_avg_pool=True),
|
17 |
+
head=dict(type='MaclaHead', temperature=0.1))
|
18 |
+
data_source = 'ImageNet'
|
19 |
+
dataset_type = 'MultiViewDataset'
|
20 |
+
img_norm_cfg = dict(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
|
21 |
+
train_pipeline = [
|
22 |
+
dict(type='RandomResizedCrop', size=224),
|
23 |
+
dict(type='RandomHorizontalFlip'),
|
24 |
+
dict(
|
25 |
+
type='RandomAppliedTrans',
|
26 |
+
transforms=[
|
27 |
+
dict(
|
28 |
+
type='ColorJitter',
|
29 |
+
brightness=0.8,
|
30 |
+
contrast=0.8,
|
31 |
+
saturation=0.8,
|
32 |
+
hue=0.2)
|
33 |
+
],
|
34 |
+
p=0.8),
|
35 |
+
dict(type='RandomGrayscale', p=0.2),
|
36 |
+
dict(type='GaussianBlur', sigma_min=0.1, sigma_max=2.0, p=0.5),
|
37 |
+
dict(type='ToTensor'),
|
38 |
+
dict(
|
39 |
+
type='Normalize',
|
40 |
+
mean=[0.485, 0.456, 0.406],
|
41 |
+
std=[0.229, 0.224, 0.225])
|
42 |
+
]
|
43 |
+
prefetch = False
|
44 |
+
data = dict(
|
45 |
+
samples_per_gpu=256,
|
46 |
+
workers_per_gpu=4,
|
47 |
+
train=dict(
|
48 |
+
type='MultiViewDataset',
|
49 |
+
data_source=dict(
|
50 |
+
type='ImageNet',
|
51 |
+
data_prefix='./data/train',
|
52 |
+
ann_file='./data/train.txt'),
|
53 |
+
num_views=[2],
|
54 |
+
pipelines=[[{
|
55 |
+
'type': 'RandomResizedCrop',
|
56 |
+
'size': 224
|
57 |
+
}, {
|
58 |
+
'type': 'RandomHorizontalFlip'
|
59 |
+
}, {
|
60 |
+
'type':
|
61 |
+
'RandomAppliedTrans',
|
62 |
+
'transforms': [{
|
63 |
+
'type': 'ColorJitter',
|
64 |
+
'brightness': 0.8,
|
65 |
+
'contrast': 0.8,
|
66 |
+
'saturation': 0.8,
|
67 |
+
'hue': 0.2
|
68 |
+
}],
|
69 |
+
'p':
|
70 |
+
0.8
|
71 |
+
}, {
|
72 |
+
'type': 'RandomGrayscale',
|
73 |
+
'p': 0.2
|
74 |
+
}, {
|
75 |
+
'type': 'GaussianBlur',
|
76 |
+
'sigma_min': 0.1,
|
77 |
+
'sigma_max': 2.0,
|
78 |
+
'p': 0.5
|
79 |
+
}, {
|
80 |
+
'type': 'ToTensor'
|
81 |
+
}, {
|
82 |
+
'type': 'Normalize',
|
83 |
+
'mean': [0.485, 0.456, 0.406],
|
84 |
+
'std': [0.229, 0.224, 0.225]
|
85 |
+
}]],
|
86 |
+
prefetch=False))
|
87 |
+
optimizer = dict(
|
88 |
+
type='LARS',
|
89 |
+
lr=2.4,
|
90 |
+
weight_decay=1e-06,
|
91 |
+
momentum=0.9,
|
92 |
+
paramwise_options=dict({
|
93 |
+
'(bn|gn)(\d+)?.(weight|bias)':
|
94 |
+
dict(weight_decay=0.0, lars_exclude=True),
|
95 |
+
'bias':
|
96 |
+
dict(weight_decay=0.0, lars_exclude=True)
|
97 |
+
}))
|
98 |
+
optimizer_config = dict()
|
99 |
+
lr_config = dict(
|
100 |
+
policy='CosineAnnealing',
|
101 |
+
min_lr=0.0,
|
102 |
+
warmup='linear',
|
103 |
+
warmup_iters=10,
|
104 |
+
warmup_ratio=0.0001,
|
105 |
+
warmup_by_epoch=True)
|
106 |
+
runner = dict(type='EpochBasedRunner', max_epochs=200)
|
107 |
+
checkpoint_config = dict(interval=10, max_keep_ckpts=3)
|
108 |
+
log_config = dict(interval=50, hooks=[dict(type='TextLoggerHook')])
|
109 |
+
dist_params = dict(backend='nccl')
|
110 |
+
cudnn_benchmark = True
|
111 |
+
log_level = 'INFO'
|
112 |
+
load_from = None
|
113 |
+
resume_from = None
|
114 |
+
workflow = [('train', 1)]
|
115 |
+
persistent_workers = True
|
116 |
+
opencv_num_threads = 0
|
117 |
+
mp_start_method = 'fork'
|
118 |
+
work_dir = 'trained/pretrain/simclr_2048_e200/'
|
119 |
+
auto_resume = False
|
120 |
+
gpu_ids = range(0, 8)
|
simclr_2048_e200/train_20230101_151826.log
ADDED
The diff for this file is too large to render.
See raw diff
|
|