Top-level config for an experiment (containing training and prediction).
Parameters
experiment_name: (default = 'YYYY-MM-DD')
A unique name for the experiment.
object_size: (default = 30)
A rough estimate of the size of objects in the image, given in
world units. The "patch size" of the network will be chosen based
on this estimate.
normalization_factor: (default = None)
The factor to use, for dividing the raw image pixel intensities.
If 'None', a factor is chosen based on the dtype of the array .
(e.g., np.uint8 would result in a factor of 1.0/255).
model_config:
Configuration object for the model.
train_config:
Configuration object for training.
inference_config:
Configuration object for prediction.
Source code in cellulus/configs/experiment_config.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62 | @attrs.define
class ExperimentConfig:
"""Top-level config for an experiment (containing training and prediction).
Parameters
----------
experiment_name: (default = 'YYYY-MM-DD')
A unique name for the experiment.
object_size: (default = 30)
A rough estimate of the size of objects in the image, given in
world units. The "patch size" of the network will be chosen based
on this estimate.
normalization_factor: (default = None)
The factor to use, for dividing the raw image pixel intensities.
If 'None', a factor is chosen based on the dtype of the array .
(e.g., np.uint8 would result in a factor of 1.0/255).
model_config:
Configuration object for the model.
train_config:
Configuration object for training.
inference_config:
Configuration object for prediction.
"""
model_config: ModelConfig = attrs.field(converter=to_config(ModelConfig))
experiment_name: str = attrs.field(
default=datetime.today().strftime("%Y-%m-%d"), validator=instance_of(str)
)
normalization_factor: float = attrs.field(
default=None, validator=attrs.validators.optional(instance_of(float))
)
object_size: int = attrs.field(default=30, validator=instance_of(int))
train_config: TrainConfig = attrs.field(
default=None, converter=to_config(TrainConfig)
)
inference_config: InferenceConfig = attrs.field(
default=None, converter=to_config(InferenceConfig)
)
|