-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from azavea/lf/sgd
Add stuff from last week of competition
- Loading branch information
Showing
22 changed files
with
637 additions
and
6 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
src/experiments/tagging/7_16_17/densenet/generate_experiments.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from os.path import join | ||
from copy import deepcopy | ||
|
||
from rastervision.experiment_generator import ( | ||
ExperimentGenerator, get_parent_dir) | ||
|
||
|
||
class TestExperimentGenerator(ExperimentGenerator): | ||
def generate_experiments(self): | ||
base_exp = { | ||
'batch_size': 8, | ||
'problem_type': 'tagging', | ||
'dataset_name': 'planet_kaggle', | ||
'generator_name': 'jpg', | ||
'active_input_inds': [0, 1, 2], | ||
'use_pretraining': True, | ||
'optimizer': 'adam', | ||
'lr_schedule': [[0, 0.0001], [10, 0.00001]], | ||
'model_type': 'densenet121', | ||
'train_ratio': 0.99, | ||
'epochs': 15, | ||
'nb_eval_plot_samples': 100, | ||
'validation_steps': 8, | ||
'run_name': 'tagging/7_16_17/densenet', | ||
'steps_per_epoch': 2400, | ||
'augment_methods': ['hflip', 'vflip', 'rotate90'] | ||
} | ||
|
||
exps = [] | ||
nb_exps = 5 | ||
for exp_ind in range(nb_exps): | ||
exp = deepcopy(base_exp) | ||
exp['run_name'] = join(exp['run_name'], str(exp_ind)) | ||
exps.append(exp) | ||
|
||
return exps | ||
|
||
|
||
if __name__ == '__main__': | ||
path = get_parent_dir(__file__) | ||
gen = TestExperimentGenerator().run(path) |
44 changes: 44 additions & 0 deletions
44
src/experiments/tagging/7_16_17/resnet/generate_experiments.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from os.path import join | ||
from copy import deepcopy | ||
|
||
from rastervision.experiment_generator import ( | ||
ExperimentGenerator, get_parent_dir) | ||
|
||
|
||
class TestExperimentGenerator(ExperimentGenerator): | ||
def generate_experiments(self): | ||
base_exp = { | ||
'batch_size': 32, | ||
'git_commit': '7f79ca', | ||
'problem_type': 'tagging', | ||
'dataset_name': 'planet_kaggle', | ||
'generator_name': 'jpg', | ||
'active_input_inds': [0, 1, 2], | ||
'use_pretraining': True, | ||
'optimizer': 'sgd', | ||
'lr_schedule': [[0, 1e-2], [10, 1e-3]], | ||
'nesterov': True, | ||
'momentum': 0.9, | ||
'train_ratio': 0.99, | ||
'nb_eval_plot_samples': 100, | ||
'epochs': 20, | ||
'validation_steps': 8, | ||
'run_name': 'tagging/7_16_17/resnet', | ||
'steps_per_epoch': 600, | ||
'augment_methods': ['hflip', 'vflip', 'rotate90'], | ||
'model_type': 'baseline_resnet' | ||
} | ||
exps = [] | ||
exp_count = 0 | ||
for run_ind in range(5): | ||
exp = deepcopy(base_exp) | ||
exp['run_name'] = join(exp['run_name'], str(exp_count)) | ||
exps.append(exp) | ||
exp_count += 1 | ||
|
||
return exps | ||
|
||
|
||
if __name__ == '__main__': | ||
path = get_parent_dir(__file__) | ||
gen = TestExperimentGenerator().run(path) |
42 changes: 42 additions & 0 deletions
42
src/experiments/tagging/7_17_17/densenet_transform/generate_experiments.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from os.path import join | ||
from copy import deepcopy | ||
|
||
from rastervision.experiment_generator import ( | ||
ExperimentGenerator, get_parent_dir) | ||
|
||
|
||
class TestExperimentGenerator(ExperimentGenerator): | ||
def generate_experiments(self): | ||
base_exp = { | ||
'batch_size': 8, | ||
'problem_type': 'tagging', | ||
'dataset_name': 'planet_kaggle', | ||
'generator_name': 'jpg', | ||
'active_input_inds': [0, 1, 2], | ||
'use_pretraining': True, | ||
'optimizer': 'adam', | ||
'lr_schedule': [[0, 0.0001], [10, 0.00001]], | ||
'model_type': 'densenet121', | ||
'train_ratio': 0.99, | ||
'epochs': 15, | ||
'nb_eval_plot_samples': 100, | ||
'validation_steps': 8, | ||
'run_name': 'tagging/7_17_17/densenet_transform', | ||
'steps_per_epoch': 2400, | ||
'augment_methods': ['hflip', 'vflip', 'rotate', 'zoom', | ||
'translate'] | ||
} | ||
|
||
exps = [] | ||
nb_exps = 5 | ||
for exp_ind in range(nb_exps): | ||
exp = deepcopy(base_exp) | ||
exp['run_name'] = join(exp['run_name'], str(exp_ind)) | ||
exps.append(exp) | ||
|
||
return exps | ||
|
||
|
||
if __name__ == '__main__': | ||
path = get_parent_dir(__file__) | ||
gen = TestExperimentGenerator().run(path) |
35 changes: 35 additions & 0 deletions
35
src/experiments/tagging/7_17_17/inception/inception_adam.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"active_input_inds": [ | ||
0, | ||
1, | ||
2 | ||
], | ||
"augment_methods": [ | ||
"hflip", | ||
"vflip", | ||
"rotate90" | ||
], | ||
"batch_size": 32, | ||
"dataset_name": "planet_kaggle", | ||
"epochs": 20, | ||
"generator_name": "jpg", | ||
"lr_schedule": [ | ||
[ | ||
0, | ||
0.0001 | ||
], | ||
[ | ||
10, | ||
0.00001 | ||
] | ||
], | ||
"model_type": "inception_v3", | ||
"nb_eval_plot_samples": 100, | ||
"optimizer": "adam", | ||
"problem_type": "tagging", | ||
"run_name": "tagging/7_17_17/inception/inception_adam", | ||
"steps_per_epoch": 600, | ||
"train_ratio": 0.8, | ||
"use_pretraining": true, | ||
"validation_steps": 120 | ||
} |
37 changes: 37 additions & 0 deletions
37
src/experiments/tagging/7_17_17/inception/inception_rms.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"active_input_inds": [ | ||
0, | ||
1, | ||
2 | ||
], | ||
"augment_methods": [ | ||
"hflip", | ||
"vflip", | ||
"rotate90" | ||
], | ||
"batch_size": 32, | ||
"dataset_name": "planet_kaggle", | ||
"epochs": 20, | ||
"generator_name": "jpg", | ||
"lr_schedule": [ | ||
[ | ||
0, | ||
0.005 | ||
], | ||
[ | ||
10, | ||
0.0005 | ||
] | ||
], | ||
"model_type": "inception_v3", | ||
"nb_eval_plot_samples": 100, | ||
"optimizer": "rms_prop", | ||
"rho": 0.9, | ||
"epsilon": 1.0, | ||
"problem_type": "tagging", | ||
"run_name": "tagging/7_17_17/inception/inception_rms", | ||
"steps_per_epoch": 600, | ||
"train_ratio": 0.8, | ||
"use_pretraining": true, | ||
"validation_steps": 120 | ||
} |
39 changes: 39 additions & 0 deletions
39
src/experiments/tagging/7_17_17/inception/inception_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"active_input_inds": [ | ||
0, | ||
1, | ||
2 | ||
], | ||
"augment_methods": [ | ||
"hflip", | ||
"vflip", | ||
"rotate90" | ||
], | ||
"batch_size": 1, | ||
"dataset_name": "planet_kaggle", | ||
"epochs": 2, | ||
"generator_name": "jpg", | ||
"lr_schedule": [ | ||
[ | ||
0, | ||
0.005 | ||
], | ||
[ | ||
10, | ||
0.0005 | ||
] | ||
], | ||
"nb_eval_samples": 1, | ||
"nb_eval_plot_samples": 1, | ||
"model_type": "inception_v3", | ||
"nb_eval_plot_samples": 1, | ||
"optimizer": "rms_prop", | ||
"rho": 0.9, | ||
"epsilon": 1.0, | ||
"problem_type": "tagging", | ||
"run_name": "tagging/7_17_17/inception/inception_test", | ||
"steps_per_epoch": 1, | ||
"train_ratio": 0.8, | ||
"use_pretraining": true, | ||
"validation_steps": 1 | ||
} |
45 changes: 45 additions & 0 deletions
45
src/experiments/tagging/7_17_17/resnet_transform/generate_experiments.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from os.path import join | ||
from copy import deepcopy | ||
|
||
from rastervision.experiment_generator import ( | ||
ExperimentGenerator, get_parent_dir) | ||
|
||
|
||
class TestExperimentGenerator(ExperimentGenerator): | ||
def generate_experiments(self): | ||
base_exp = { | ||
'batch_size': 32, | ||
'git_commit': '7f79ca', | ||
'problem_type': 'tagging', | ||
'dataset_name': 'planet_kaggle', | ||
'generator_name': 'jpg', | ||
'active_input_inds': [0, 1, 2], | ||
'use_pretraining': True, | ||
'optimizer': 'sgd', | ||
'lr_schedule': [[0, 1e-2], [10, 1e-3]], | ||
'nesterov': True, | ||
'momentum': 0.9, | ||
'train_ratio': 0.99, | ||
'nb_eval_plot_samples': 100, | ||
'epochs': 20, | ||
'validation_steps': 8, | ||
'run_name': 'tagging/7_17_17/resnet_transform', | ||
'steps_per_epoch': 600, | ||
'augment_methods': ['hflip', 'vflip', 'rotate', 'zoom', | ||
'translate'], | ||
'model_type': 'baseline_resnet' | ||
} | ||
exps = [] | ||
exp_count = 0 | ||
for run_ind in range(5): | ||
exp = deepcopy(base_exp) | ||
exp['run_name'] = join(exp['run_name'], str(exp_count)) | ||
exps.append(exp) | ||
exp_count += 1 | ||
|
||
return exps | ||
|
||
|
||
if __name__ == '__main__': | ||
path = get_parent_dir(__file__) | ||
gen = TestExperimentGenerator().run(path) |
42 changes: 42 additions & 0 deletions
42
src/experiments/tagging/7_18_17/80/densenet_transform/generate_experiments.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from os.path import join | ||
from copy import deepcopy | ||
|
||
from rastervision.experiment_generator import ( | ||
ExperimentGenerator, get_parent_dir) | ||
|
||
|
||
class TestExperimentGenerator(ExperimentGenerator): | ||
def generate_experiments(self): | ||
base_exp = { | ||
'batch_size': 8, | ||
'problem_type': 'tagging', | ||
'dataset_name': 'planet_kaggle', | ||
'generator_name': 'jpg', | ||
'active_input_inds': [0, 1, 2], | ||
'use_pretraining': True, | ||
'optimizer': 'adam', | ||
'lr_schedule': [[0, 0.0001], [10, 0.00001]], | ||
'model_type': 'densenet121', | ||
'train_ratio': 0.8, | ||
'epochs': 15, | ||
'nb_eval_plot_samples': 100, | ||
'validation_steps': 600, | ||
'run_name': 'tagging/7_18_17/80/densenet_transform', | ||
'steps_per_epoch': 2400, | ||
'augment_methods': ['hflip', 'vflip', 'rotate', 'zoom', | ||
'translate'] | ||
} | ||
|
||
exps = [] | ||
nb_exps = 2 | ||
for exp_ind in range(nb_exps): | ||
exp = deepcopy(base_exp) | ||
exp['run_name'] = join(exp['run_name'], str(exp_ind)) | ||
exps.append(exp) | ||
|
||
return exps | ||
|
||
|
||
if __name__ == '__main__': | ||
path = get_parent_dir(__file__) | ||
gen = TestExperimentGenerator().run(path) |
43 changes: 43 additions & 0 deletions
43
src/experiments/tagging/7_18_17/80/inception/generate_experiments.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from os.path import join | ||
from copy import deepcopy | ||
|
||
from rastervision.experiment_generator import ( | ||
ExperimentGenerator, get_parent_dir) | ||
|
||
|
||
class TestExperimentGenerator(ExperimentGenerator): | ||
def generate_experiments(self): | ||
base_exp = { | ||
'batch_size': 32, | ||
'problem_type': 'tagging', | ||
'dataset_name': 'planet_kaggle', | ||
'generator_name': 'jpg', | ||
'active_input_inds': [0, 1, 2], | ||
'use_pretraining': True, | ||
'optimizer': 'sgd', | ||
'lr_schedule': [[0, 1e-2], [15, 1e-3]], | ||
'nesterov': True, | ||
'momentum': 0.9, | ||
'train_ratio': 0.8, | ||
'nb_eval_plot_samples': 100, | ||
'epochs': 30, | ||
'validation_steps': 120, | ||
'run_name': 'tagging/7_18_17/80/inception/', | ||
'steps_per_epoch': 600, | ||
'augment_methods': ['hflip', 'vflip', 'rotate90'], | ||
'model_type': 'inception_v3' | ||
} | ||
exps = [] | ||
exp_count = 0 | ||
for run_ind in range(5): | ||
exp = deepcopy(base_exp) | ||
exp['run_name'] = join(exp['run_name'], str(exp_count)) | ||
exps.append(exp) | ||
exp_count += 1 | ||
|
||
return exps | ||
|
||
|
||
if __name__ == '__main__': | ||
path = get_parent_dir(__file__) | ||
gen = TestExperimentGenerator().run(path) |
Oops, something went wrong.