-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for external optimizers See merge request es/ai/hannah/hannah!402
- Loading branch information
Showing
23 changed files
with
1,256 additions
and
67 deletions.
There are no files selected for viewing
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
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
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
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,22 @@ | ||
# @package _global_ | ||
defaults: | ||
- override /nas: aging_evolution_nas | ||
- override /model: embedded_vision_net | ||
- override /dataset: cifar10 | ||
|
||
model: | ||
num_classes: 10 | ||
module: | ||
batch_size: 128 | ||
nas: | ||
budget: 300 | ||
n_jobs: 8 | ||
|
||
|
||
trainer: | ||
max_epochs: 10 | ||
|
||
seed: [1234] | ||
|
||
experiment_id: "ae_nas" | ||
|
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,23 @@ | ||
# @package _global_ | ||
defaults: | ||
- override /nas: aging_evolution_nas | ||
- override /nas/sampler: nsga2 | ||
- override /model: embedded_vision_net | ||
- override /dataset: cifar10 | ||
|
||
model: | ||
num_classes: 10 | ||
module: | ||
batch_size: 128 | ||
nas: | ||
budget: 300 | ||
n_jobs: 8 | ||
|
||
|
||
trainer: | ||
max_epochs: 10 | ||
|
||
seed: [1234] | ||
|
||
experiment_id: "ae_nas" | ||
|
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 |
---|---|---|
|
@@ -18,4 +18,4 @@ trainer: | |
|
||
seed: [1234] | ||
|
||
experiment_id: "ae_nas_cifar10" | ||
experiment_id: "ae_nas" |
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,24 @@ | ||
defaults: | ||
- base_config | ||
- override dataset: mnist # Dataset configuration name | ||
- override features: identity # Feature extractor configuration name (use identity for vision datasets) | ||
- override model: timm_resnet18 #timm_mobilenetv3_small_100 # Neural network name (for now timm_resnet50 or timm_efficientnet_lite1) | ||
- override optimizer: sgd # Optimizer config name | ||
- override normalizer: null # Feature normalizer (used for quantized neural networks) | ||
- override module: image_classifier # Lightning module config for the training loop (image classifier for image classification tasks) | ||
- _self_ | ||
|
||
|
||
monitor: | ||
metric: val_accuracy | ||
direction: maximize | ||
|
||
module: | ||
batch_size: 2048 | ||
|
||
trainer: | ||
max_epochs: 50 | ||
precision: 16 | ||
|
||
optimizer: | ||
lr: 0.3 |
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,22 @@ | ||
## | ||
## Copyright (c) 2022 University of Tübingen. | ||
## | ||
## This file is part of hannah. | ||
## See https://atreus.informatik.uni-tuebingen.de/ties/ai/hannah/hannah for further info. | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); | ||
## you may not use this file except in compliance with the License. | ||
## You may obtain a copy of the License at | ||
## | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, | ||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
## See the License for the specific language governing permissions and | ||
## limitations under the License. | ||
## | ||
data_folder: ${hydra:runtime.cwd}/datasets/ | ||
cls: hannah.datasets.vision.Cifar100Dataset | ||
dataset: cifar100 | ||
val_percent: 0.1 |
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,22 @@ | ||
## | ||
## Copyright (c) 2022 University of Tübingen. | ||
## | ||
## This file is part of hannah. | ||
## See https://atreus.informatik.uni-tuebingen.de/ties/ai/hannah/hannah for further info. | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); | ||
## you may not use this file except in compliance with the License. | ||
## You may obtain a copy of the License at | ||
## | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, | ||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
## See the License for the specific language governing permissions and | ||
## limitations under the License. | ||
## | ||
data_folder: ${hydra:runtime.cwd}/datasets/ | ||
cls: hannah.datasets.vision.MNISTDataset | ||
dataset: mnist | ||
val_percent: 0.1 |
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,22 @@ | ||
## | ||
## Copyright (c) 2022 University of Tübingen. | ||
## | ||
## This file is part of hannah. | ||
## See https://atreus.informatik.uni-tuebingen.de/ties/ai/hannah/hannah for further info. | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); | ||
## you may not use this file except in compliance with the License. | ||
## You may obtain a copy of the License at | ||
## | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, | ||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
## See the License for the specific language governing permissions and | ||
## limitations under the License. | ||
## | ||
data_folder: ${hydra:runtime.cwd}/datasets/ | ||
cls: hannah.datasets.vision.SVHNDataset | ||
dataset: svhn | ||
val_percent: 0.1 |
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,3 @@ | ||
_target_: hannah.nas.search.sampler.pymoo.PyMOOSampler | ||
algorithm: nsga2 | ||
population_size: 100 |
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
Oops, something went wrong.