Recursively instantiate SimpleDenseNet using Hydra (#209)

* Add recursive instantiation of `net` object which is passed to `MNISTLitModule` on init
This commit is contained in:
Nils Werner authored and GitHub committed 2022-03-03 01:31:50 +01:00
1 parent 5b7fde8e3a
commit d0803d4e63
6 files changed
+48 -38

No files matched your search

+4 -3
View File
@@ -24,10 +24,11 @@ trainer:
gradient_clip_val: 0.5
model:
lin1_size: 128
lin2_size: 256
lin3_size: 64
lr: 0.002
net:
lin1_size: 128
lin2_size: 256
lin3_size: 64
datamodule:
batch_size: 64
+3 -3
View File
@@ -49,12 +49,12 @@ hydra:
type: float
low: 0.0001
high: 0.2
model.lin1_size:
model.net.lin1_size:
type: categorical
choices: [32, 64, 128, 256, 512]
model.lin2_size:
model.net.lin2_size:
type: categorical
choices: [32, 64, 128, 256, 512]
model.lin3_size:
model.net.lin3_size:
type: categorical
choices: [32, 64, 128, 256, 512]
+8 -6
View File
@@ -1,9 +1,11 @@
_target_: src.models.mnist_module.MNISTLitModule
input_size: 784
lin1_size: 256
lin2_size: 256
lin3_size: 256
output_size: 10
lr: 0.001
weight_decay: 0.0005
net:
_target_: src.models.components.simple_dense_net.SimpleDenseNet
input_size: 784
lin1_size: 256
lin2_size: 256
lin3_size: 256
output_size: 10