You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tensor_names: [<str>, ...] # names of tensors to be logged as .tif files
114
115
115
-
criterion: # criterion to optimize ('loss')
116
-
name: <LossOnTensors child># `LossOnTensors` child class specified in hylfm.losses
117
-
kwargs: {...} # key word arguments
118
-
tensor_names: {...} # tensor name mapping
116
+
criterion: # criterion to optimize ('loss')
117
+
name: <str> # `LossOnTensors` child class specified in hylfm.losses
118
+
kwargs: {...} # key word arguments
119
+
tensor_names: {...} # tensor name mapping
119
120
120
-
sampler: # data sampling strategy
121
-
base: RandomSampler # `torch.utils.data.sampler.Sampler` child class in torch.utils.data
122
-
drop_last: <bool> # drop last samples if less samples than 'batch_size' remain
121
+
sampler: # data sampling strategy
122
+
base: <str># `torch.utils.data.sampler.Sampler` child class in torch.utils.data
123
+
drop_last: <bool> # drop last samples if less samples than 'batch_size' remain
123
124
124
-
batch_preprocessing: [...] # List of `Transform` child classes as specified in hylfm.transformations and their kwargs
125
+
batch_preprocessing: [...] # List of `Transform` child classes as specified in hylfm.transformations with kwargs
125
126
batch_preprocessing_in_step: [...] # like 'batch_preprocessing', but in the iteration step (on GPU)
126
-
batch_postprocessing: [...] # like 'batch_preprocessing', but after `model.forward()`
127
+
batch_postprocessing: [...] # like 'batch_preprocessing', but after `model.forward()`
127
128
128
129
data:
129
-
- batch_size: <training batch size>
130
+
- batch_size: <int>
130
131
sample_preprocessing: [...] # like 'batch_preprocessing', but before batch assembly on single sample
131
132
datasets: # list of datasets=named tensors
132
-
- tensors: {<tensor name>: <info name>, ...} # named tensors, each resolved by `hylfm.datasets.get_tensor_info()`
133
-
[sample_transformations: [...]] # overwrites 'sample_preprocessing' for this dataset (optional)
134
-
# subselect indices as List[int], single int, or string resolved by `hylfm.setup._utils.indice_string_to_list()`
135
-
indices: null # null = "all indices"
136
-
137
-
validate: # validation stage of this training stage
138
-
... # a validation stage is an evaluation stage with the following additional keys:
139
-
score_metric: smooth_l1_loss-scaled # metric name (that has to exist in this stage's 'metrics') to use as validation score
140
-
period: {value: 1, unit: epoch} # how often to validate wrt to parent training stage
141
-
patience: 10# stop after not improvement of 'score_metric' for 'patience' validations
142
-
143
-
- test: # stage name of an evaluation stage (no 'optimizer' defined)
144
-
metrics: beads.yml # any subconfig part can be substituted by a yml file in configs/<key=metrics>/<file name=beads.yml>
145
-
log: {...} # these fields are described above in 'train'
133
+
- tensors: {<tensor_name>: <str>, ...} # named tensors, each resolved by `hylfm.datasets.get_tensor_info()`
134
+
[sample_transformations: [...]] # overwrites 'sample_preprocessing' for this dataset (optional)
135
+
# subselect indices as List[int], int, or string resolved by `hylfm.setup._utils.indice_string_to_list()`
136
+
indices: null # null = "all indices"
137
+
138
+
validate: # validation stage of this training stage
139
+
... # a validation stage is an evaluation stage with the following additional keys:
140
+
score_metric: <str> # metric name (that has to exist in this stage's 'metrics') to use as validation score
141
+
period: {value: <int>, unit: <epoch|iteration>} # how often to validate wrt to parent training stage
142
+
patience: <int> # stop after not improvement of 'score_metric' for 'patience' validations
143
+
144
+
- test: # stage name of an evaluation stage (no 'optimizer' defined)
145
+
# the following fields are described above in 'train':
146
+
metrics: [...]
147
+
log: {...}
146
148
batch_preprocessing: [...]
147
149
batch_preprocessing_in_step: [...]
148
150
batch_postprocessing: [...]
149
151
data: [...]
150
152
```
151
153
152
154
153
-
#### Logging
154
-
How and if to log to TensorBoard and/or individual output files, as well as if to display a tqdm-progress bar is configurable in the `log` field for each `stage`:
155
-
```yaml
156
-
stages:
157
-
- test:
158
-
...
159
-
160
-
```
161
-
162
-
163
155
## Settings
164
156
To overwrite default settings, like the number of worker threads per pytorch Dataloader, adapt `hylfm/_settings/local.py` (copy from `hylfm/_settings/local.template.py`)
0 commit comments