-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use hydra for instantiating models and optimizers (#295)
* fixes #293 #246 add tests for optimizer instantiation in test_optimizers.py adapt our unet models (models/unet.py) to expect same parameter names as smp models * minor typo fixes * name model yamls as close as possible to upcoming naming convention * fix model name
- Loading branch information
Showing
37 changed files
with
187 additions
and
516 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
# @package _global_ | ||
model: | ||
_target_: models.deeplabv3_dualhead.DeepLabV3_dualhead | ||
conc_point: conv1 # Choose concatenation point in resnet encoder: 'conv1', 'maxpool', 'layer2', 'layer3', 'layer4' | ||
encoder_weights: imagenet |
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,5 @@ | ||
# @package _global_ | ||
model: | ||
_target_: models.unet.UNet | ||
dropout: False # (bool) Use dropout or not | ||
prob: False # (float) Set dropout probability, e.g. 0.5 |
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,6 @@ | ||
# @package _global_ | ||
model: | ||
_target_: models.unet.UNetSmall | ||
dropout: False # (bool) Use dropout or not | ||
prob: False # (float) Set dropout probability, e.g. 0.5 | ||
|
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,5 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.DeepLabV3 | ||
encoder_name: resnet101 | ||
encoder_weights: imagenet |
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,5 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.DeepLabV3Plus | ||
encoder_name: resnext50_32x4d | ||
encoder_weights: imagenet |
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,5 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.MAnet | ||
encoder_name: resnext101_32x8d | ||
encoder_weights: imagenet |
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,5 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.PAN | ||
encoder_name: se_resnext101_32x4d | ||
encoder_weights: imagenet |
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,7 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.Unet | ||
encoder_name: resnext101_32x8d | ||
encoder_depth: 4 | ||
decoder_channels: [ 256, 128, 64, 32 ] | ||
encoder_weights: imagenet |
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,5 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.Unet | ||
encoder_name: vgg11 | ||
encoder_weights: imagenet |
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,6 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.Unet | ||
encoder_name: efficientnet-b5 | ||
encoder_weights: imagenet | ||
|
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,5 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.Unet | ||
encoder_name: senet154 | ||
encoder_weights: imagenet |
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,6 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.Unet | ||
encoder_name: resnext50_32x4d | ||
encoder_depth: 5 | ||
encoder_weights: imagenet |
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,8 @@ | ||
# @package _global_ | ||
model: | ||
_target_: segmentation_models_pytorch.UnetPlusPlus | ||
encoder_name: se_resnext50_32x4d | ||
encoder_depth: 4 | ||
decoder_channels: [256, 128, 64, 32] | ||
decoder_attention_type: scse | ||
encoder_weights: imagenet |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
121 changes: 0 additions & 121 deletions
121
config/old_development/config_test_4channels_implementation.yaml
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
# @package _global_ | ||
optimizer: | ||
_target_: utils.adabound.AdaBound | ||
lr: ${training.lr} | ||
gamma: 1e-3 | ||
eps: 1e-8 | ||
weight_decay: 4e-5 |
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,7 @@ | ||
# @package _global_ | ||
optimizer: | ||
_target_: utils.adabound.AdaBoundW | ||
lr: ${training.lr} | ||
gamma: 1e-3 | ||
eps: 1e-8 | ||
weight_decay: 4e-5 |
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# @package _global_ | ||
optimizer: | ||
optimizer_name: 'adam' | ||
class_name: torch.optim.Adam | ||
params: | ||
lr: ${training.lr} | ||
_target_: torch.optim.Adam | ||
lr: ${training.lr} |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# @package _global_ | ||
optimizer: | ||
optimizer_name: 'adamw' | ||
class_name: torch.optim.AdamW | ||
params: | ||
lr: ${training.lr} | ||
weight_decay: 0.001 | ||
_target_: torch.optim.AdamW | ||
lr: ${training.lr} | ||
weight_decay: 4e-5 |
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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
# @package _global_ | ||
optimizer: | ||
optimizer_name: 'sgd' | ||
class_name: torch.optim.SGD | ||
params: | ||
lr: ${training.lr} | ||
momentum: 0.9 | ||
weight_decay: 0.0005 | ||
_target_: torch.optim.SGD | ||
lr: ${training.lr} | ||
momentum: 0.9 | ||
weight_decay: 4e-5 |
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.