Verified Commit 3d956cd4 authored by Yaoyao Liu's avatar Yaoyao Liu
Browse files

Update config files

parent 6b721e3b
......@@ -2,11 +2,13 @@
*.pyc
*.npy
*.tar.gz
*.out
# Folders
ckpts
results
__pycache__
./data
# File
.DS_Store
......
/BS/yaoyaoliu_project/work/incremental-new/incremental_learning-4-0-1/data
\ No newline at end of file
dataset: cifar100
model: rmm
convnet: rebuffi
eval_type: cnn
initial_increment: 50
increment: 5
label: rmm_cifar100_10phase
classifier_config:
type: cosine
proxy_per_class: 10
distance: neg_stable_cosine_distance
postprocessor_config:
type: learned_scaling
initial_value: 1.0
pod_flat:
scheduled_factor: 1.0
pod_spatial:
scheduled_factor: 3.0
collapse_channels: spatial
nca:
margin: 0.6
scale: 1.
exclude_pos_denominator: true
groupwise_factors:
old_weights: 0.
finetuning_config:
sampling: undersampling
tuning: classifier
lr: 0.05
epochs: 20
scaling: null
# Cosine Scheduling (CS)
scheduling: cosine
# Misc
epochs: 160
lr: 0.1
lr_decay: 0.1
optimizer: sgd
proxy_per_class: 1
weight_decay: 0.0005
weight_generation:
type: imprinted
multi_class_diff: kmeans
dataset_transforms:
color_jitter: true
order:
- [87, 0, 52, 58, 44, 91, 68, 97, 51, 15, 94, 92, 10, 72, 49, 78, 61, 14, 8, 86, 84, 96, 18, 24, 32, 45, 88, 11, 4, 67, 69, 66, 77, 47, 79, 93, 29, 50, 57, 83, 17, 81, 41, 12, 37, 59, 25, 20, 80, 73, 1, 28, 6, 46, 62, 82, 53, 9, 31, 75, 38, 63, 33, 74, 27, 22, 36, 3, 16, 21, 60, 19, 70, 90, 89, 43, 5, 42, 65, 76, 40, 30, 23, 85, 2, 95, 56, 48, 71, 64, 98, 13, 99, 7, 34, 55, 54, 26, 35, 39]
- [58, 30, 93, 69, 21, 77, 3, 78, 12, 71, 65, 40, 16, 49, 89, 46, 24, 66, 19, 41, 5, 29, 15, 73, 11, 70, 90, 63, 67, 25, 59, 72, 80, 94, 54, 33, 18, 96, 2, 10, 43, 9, 57, 81, 76, 50, 32, 6, 37, 7, 68, 91, 88, 95, 85, 4, 60, 36, 22, 27, 39, 42, 34, 51, 55, 28, 53, 48, 38, 17, 83, 86, 56, 35, 45, 79, 99, 84, 97, 82, 98, 26, 47, 44, 62, 13, 31, 0, 75, 14, 52, 74, 8, 20, 1, 92, 87, 23, 64, 61]
- [71, 54, 45, 32, 4, 8, 48, 66, 1, 91, 28, 82, 29, 22, 80, 27, 86, 23, 37, 47, 55, 9, 14, 68, 25, 96, 36, 90, 58, 21, 57, 81, 12, 26, 16, 89, 79, 49, 31, 38, 46, 20, 92, 88, 40, 39, 98, 94, 19, 95, 72, 24, 64, 18, 60, 50, 63, 61, 83, 76, 69, 35, 0, 52, 7, 65, 42, 73, 74, 30, 41, 3, 6, 53, 13, 56, 70, 77, 34, 97, 75, 2, 17, 93, 33, 84, 99, 51, 62, 87, 5, 15, 10, 78, 67, 44, 59, 85, 43, 11]
seed: [1, 1, 1]
mem_rate_list:
- [0.7, 0.7, 0.7, 0.7, 0.7, 0.6, 0.6, 0.6, 0.6, 0.7, 0.7]
cls_rate_list:
- [0.0, 0.0, 0.1, 0.1, 0.1, 0.0, 0.0, 0.1, 0.0, 0.1, 0.0]
dataset: cifar100
model: rmm
convnet: rebuffi
eval_type: cnn
initial_increment: 50
increment: 2
label: rmm_cifar100_25phase
classifier_config:
type: cosine
proxy_per_class: 10
distance: neg_stable_cosine_distance
postprocessor_config:
type: learned_scaling
initial_value: 1.0
pod_flat:
scheduled_factor: 1.0
pod_spatial:
scheduled_factor: 3.0
collapse_channels: spatial
nca:
margin: 0.6
scale: 1.
exclude_pos_denominator: true
groupwise_factors:
old_weights: 0.
finetuning_config:
sampling: undersampling
tuning: classifier
lr: 0.05
epochs: 20
scaling: null
# Cosine Scheduling (CS)
scheduling: cosine
# Misc
epochs: 160
lr: 0.1
lr_decay: 0.1
optimizer: sgd
proxy_per_class: 1
weight_decay: 0.0005
weight_generation:
type: imprinted
multi_class_diff: kmeans
dataset_transforms:
color_jitter: true
order:
- [87, 0, 52, 58, 44, 91, 68, 97, 51, 15, 94, 92, 10, 72, 49, 78, 61, 14, 8, 86, 84, 96, 18, 24, 32, 45, 88, 11, 4, 67, 69, 66, 77, 47, 79, 93, 29, 50, 57, 83, 17, 81, 41, 12, 37, 59, 25, 20, 80, 73, 1, 28, 6, 46, 62, 82, 53, 9, 31, 75, 38, 63, 33, 74, 27, 22, 36, 3, 16, 21, 60, 19, 70, 90, 89, 43, 5, 42, 65, 76, 40, 30, 23, 85, 2, 95, 56, 48, 71, 64, 98, 13, 99, 7, 34, 55, 54, 26, 35, 39]
- [58, 30, 93, 69, 21, 77, 3, 78, 12, 71, 65, 40, 16, 49, 89, 46, 24, 66, 19, 41, 5, 29, 15, 73, 11, 70, 90, 63, 67, 25, 59, 72, 80, 94, 54, 33, 18, 96, 2, 10, 43, 9, 57, 81, 76, 50, 32, 6, 37, 7, 68, 91, 88, 95, 85, 4, 60, 36, 22, 27, 39, 42, 34, 51, 55, 28, 53, 48, 38, 17, 83, 86, 56, 35, 45, 79, 99, 84, 97, 82, 98, 26, 47, 44, 62, 13, 31, 0, 75, 14, 52, 74, 8, 20, 1, 92, 87, 23, 64, 61]
- [71, 54, 45, 32, 4, 8, 48, 66, 1, 91, 28, 82, 29, 22, 80, 27, 86, 23, 37, 47, 55, 9, 14, 68, 25, 96, 36, 90, 58, 21, 57, 81, 12, 26, 16, 89, 79, 49, 31, 38, 46, 20, 92, 88, 40, 39, 98, 94, 19, 95, 72, 24, 64, 18, 60, 50, 63, 61, 83, 76, 69, 35, 0, 52, 7, 65, 42, 73, 74, 30, 41, 3, 6, 53, 13, 56, 70, 77, 34, 97, 75, 2, 17, 93, 33, 84, 99, 51, 62, 87, 5, 15, 10, 78, 67, 44, 59, 85, 43, 11]
seed: [1, 1, 1]
mem_rate_list:
- [0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.8, 0.8, 0.8, 0.8, 0.8, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9]
cls_rate_list:
- [0.0, 0.0, 0.1, 0.1, 0.1, 0.0, 0.0, 0.0, 0.1, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, 0.1, 0.1, 0.1, 0.0, 0.0, 0.0]
dataset: imagenet100
model: rmm
convnet: rebuffi
initial_increment: 50
increment: 5
label: rmm_imagenet_sub_10phase
convnet: resnet18
convnet_config:
nf: 64
batch_size: 64
data_path: data
eval_type: cnn
classifier_config:
type: cosine
proxy_per_class: 10
distance: neg_stable_cosine_distance
postprocessor_config:
type: learned_scaling
initial_value: 1.0
pod_flat:
scheduled_factor: 10.0
pod_spatial:
scheduled_factor: 8.0
collapse_channels: spatial
nca:
margin: 0.6
scale: 1.
exclude_pos_denominator: true
groupwise_factors:
old_weights: 0.
finetuning_config:
sampling: undersampling
tuning: classifier
lr: 0.01
epochs: 20
scaling: null
# Cosine Scheduling (CS)
scheduling: cosine
# Misc
epochs: 90
lr: 0.05
lr_decay: 0.1
optimizer: sgd
proxy_per_class: 1
weight_decay: 0.0005
weight_generation:
type: imprinted
multi_class_diff: kmeans
dataset_transforms:
color_jitter: true
data_path: data/imagenet
order:
- [68, 56, 78, 8, 23, 84, 90, 65, 74, 76, 40, 89, 3, 92, 55, 9, 26, 80, 43, 38, 58, 70, 77, 1, 85, 19, 17, 50, 28, 53, 13, 81, 45, 82, 6, 59, 83, 16, 15, 44, 91, 41, 72, 60, 79, 52, 20, 10, 31, 54, 37, 95, 14, 71, 96, 98, 97, 2, 64, 66, 42, 22, 35, 86, 24, 34, 87, 21, 99, 0, 88, 27, 18, 94, 11, 12, 47, 25, 30, 46, 62, 69, 36, 61, 7, 63, 75, 5, 32, 4, 51, 48, 73, 93, 39, 67, 29, 49, 57, 33]
seed: [2020]
mem_rate_list:
- [0.7, 0.7, 0.7, 0.8, 0.8, 0.6, 0.6, 0.7, 0.7, 0.7, 0.7]
cls_rate_list:
- [0.0, 0.0, 0.1, 0.1, 0.1, 0.0, 0.0, 0.1, 0.0, 0.1, 0.0]
dataset: imagenet100
model: rmm
convnet: rebuffi
initial_increment: 50
increment: 2
label: rmm_imagenet_sub_25phase
convnet: resnet18
convnet_config:
nf: 64
batch_size: 64
data_path: data
eval_type: cnn
classifier_config:
type: cosine
proxy_per_class: 10
distance: neg_stable_cosine_distance
postprocessor_config:
type: learned_scaling
initial_value: 1.0
pod_flat:
scheduled_factor: 10.0
pod_spatial:
scheduled_factor: 8.0
collapse_channels: spatial
nca:
margin: 0.6
scale: 1.
exclude_pos_denominator: true
groupwise_factors:
old_weights: 0.
finetuning_config:
sampling: undersampling
tuning: classifier
lr: 0.01
epochs: 20
scaling: null
# Cosine Scheduling (CS)
scheduling: cosine
# Misc
epochs: 90
lr: 0.05
lr_decay: 0.1
optimizer: sgd
proxy_per_class: 1
weight_decay: 0.0005
weight_generation:
type: imprinted
multi_class_diff: kmeans
dataset_transforms:
color_jitter: true
data_path: data/imagenet
order:
- [68, 56, 78, 8, 23, 84, 90, 65, 74, 76, 40, 89, 3, 92, 55, 9, 26, 80, 43, 38, 58, 70, 77, 1, 85, 19, 17, 50, 28, 53, 13, 81, 45, 82, 6, 59, 83, 16, 15, 44, 91, 41, 72, 60, 79, 52, 20, 10, 31, 54, 37, 95, 14, 71, 96, 98, 97, 2, 64, 66, 42, 22, 35, 86, 24, 34, 87, 21, 99, 0, 88, 27, 18, 94, 11, 12, 47, 25, 30, 46, 62, 69, 36, 61, 7, 63, 75, 5, 32, 4, 51, 48, 73, 93, 39, 67, 29, 49, 57, 33]
seed: [2020]
mem_rate_list:
- [0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.8, 0.8, 0.8, 0.8, 0.8, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9]
cls_rate_list:
- [0.0, 0.0, 0.1, 0.1, 0.1, 0.0, 0.0, 0.0, 0.1, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, 0.1, 0.1, 0.1, 0.0, 0.0, 0.0]
import os
def run_exp(dataset='cifar100', gpu=0):
def run_exp(dataset='cifar100', phase=5, gpu=0):
if dataset=='cifar100':
the_options = 'options/config_cifar100.yaml'
if phase==5:
the_options = 'options/config_cifar100_5phase.yaml'
elif phase==10:
the_options = 'options/config_cifar100_10phase.yaml'
elif phase==25:
the_options = 'options/config_cifar100_25phase.yaml'
else:
raise ValueError('Please set correct number of phases.')
elif dataset=='imagenet_sub':
the_options = 'options/config_imagenet_subset.yaml'
if phase==5:
the_options = 'options/config_imagenet_subset_5phase.yaml'
elif phase==10:
the_options = 'options/config_imagenet_subset_10phase.yaml'
elif phase==25:
the_options = 'options/config_imagenet_subset_25phase.yaml'
else:
raise ValueError('Please set correct number of phases.')
else:
raise ValueError('Please set correct dataset.')
......@@ -14,12 +28,12 @@ def run_exp(dataset='cifar100', gpu=0):
the_command += ' --device ' + str(gpu)
the_command += ' --save_model'
if dataset=='imagenet_sub':
the_command += ' --resume_first'
the_command += ' --resume_first_ckpt ckpts/imagenet_sub.pth'
the_command += ' 2>&1 | tee ' + 'log_rmm_' + dataset
the_command += ' 2>&1 | tee ' + 'log_rmm_' + dataset + '_' + str(phase) + 'phase'
os.system(the_command)
run_exp(dataset='cifar100', gpu=0)
run_exp(dataset='imagenet_sub', gpu=0)
run_exp(dataset='cifar100', phase=5, gpu=0)
run_exp(dataset='cifar100', phase=10, gpu=0)
run_exp(dataset='cifar100', phase=25, gpu=0)
run_exp(dataset='imagenet_sub', phase=5, gpu=0)
run_exp(dataset='imagenet_sub', phase=10, gpu=0)
run_exp(dataset='imagenet_sub', phase=25, gpu=0)
import os
def run_exp(dataset='cifar100', phase=5, gpu=0):
machine = 'slurm'
time = '6-23:59:59'
if dataset=='cifar100':
if phase==5:
the_options = 'options/config_cifar100_5phase.yaml'
elif phase==10:
the_options = 'options/config_cifar100_10phase.yaml'
elif phase==25:
the_options = 'options/config_cifar100_25phase.yaml'
else:
raise ValueError('Please set correct number of phases.')
elif dataset=='imagenet_sub':
if phase==5:
the_options = 'options/config_imagenet_subset_5phase.yaml'
elif phase==10:
the_options = 'options/config_imagenet_subset_10phase.yaml'
elif phase==25:
the_options = 'options/config_imagenet_subset_25phase.yaml'
else:
raise ValueError('Please set correct number of phases.')
else:
raise ValueError('Please set correct dataset.')
the_command = 'python3 -minclearn'
the_command += ' --options ' + the_options
the_command += ' --fixed-memory'
the_command += ' --device ' + str(gpu)
the_command += ' --save_model'
if machine == 'volta':
the_command += ' 2>&1 | tee ' + 'log_rmm_' + dataset + '_' + str(phase) + 'phase'
os.system(the_command)
elif machine == 'slurm':
tmp_script_path = './tmp_scripts'
if not os.path.exists(tmp_script_path):
os.mkdir(tmp_script_path)
os.system('cp ./scripts/run_base.sh ./tmp_scripts/rmm_'+ dataset + '_' + str(phase) + 'phase' +'.sh')
f = open('./tmp_scripts/rmm_' + dataset + '_' + str(phase) + 'phase' +'.sh', "a")
f.write(the_command)
f.close()
os.system('sbatch -p gpu20 -t '+time+' --gres gpu:1 ./tmp_scripts/rmm_' + dataset + '_' + str(phase) + 'phase' +'.sh')
else:
raise ValueError('Please set correct workstation.')
#run_exp(dataset='cifar100', phase=5, gpu=0)
#run_exp(dataset='cifar100', phase=10, gpu=0)
#run_exp(dataset='cifar100', phase=25, gpu=0)
run_exp(dataset='imagenet_sub', phase=5, gpu=0)
run_exp(dataset='imagenet_sub', phase=10, gpu=0)
#run_exp(dataset='imagenet_sub', phase=25, gpu=0)
#!/bin/bash
__conda_setup="$('/home/yaliu/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/yaliu/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/yaliu/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/yaliu/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
source activate incremental-new
#!/bin/bash
__conda_setup="$('/home/yaliu/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/yaliu/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/yaliu/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/yaliu/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
source activate incremental-new
python3 -minclearn --options options/config_cifar100_10phase.yaml --fixed-memory --device 0 --save_model
\ No newline at end of file
#!/bin/bash
__conda_setup="$('/home/yaliu/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/yaliu/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/yaliu/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/yaliu/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
source activate incremental-new
python3 -minclearn --options options/config_cifar100_25phase.yaml --fixed-memory --device 0 --save_model
\ No newline at end of file
#!/bin/bash
__conda_setup="$('/home/yaliu/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/yaliu/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/yaliu/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/yaliu/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
source activate incremental-new
python3 -minclearn --options options/config_cifar100_5phase.yaml --fixed-memory --device 0 --save_model
\ No newline at end of file
#!/bin/bash
__conda_setup="$('/home/yaliu/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/yaliu/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/yaliu/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/yaliu/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
source activate incremental-new
python3 -minclearn --options options/config_imagenet_subset_10phase.yaml --fixed-memory --device 0 --save_model
\ No newline at end of file
#!/bin/bash
__conda_setup="$('/home/yaliu/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/yaliu/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/yaliu/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/yaliu/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
source activate incremental-new
python3 -minclearn --options options/config_imagenet_subset_5phase.yaml --fixed-memory --device 0 --save_model
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment