Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit 085519d

Browse files
authored
Minor bug fixes in CovidHierarchicalModel (#490)
1 parent 3557443 commit 085519d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

InnerEye/ML/configs/classification/CovidHierarchicalModel.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,17 @@ def __init__(self, covid_dataset_id: str = COVID_DATASET_ID, **kwargs: Any):
7575
non_image_feature_channels=[],
7676
numerical_columns=[],
7777
use_mixed_precision=False,
78-
num_dataload_workers=2,
78+
num_dataload_workers=12,
7979
multiprocessing_start_method=MultiprocessingStartMethod.fork,
8080
train_batch_size=64,
8181
optimizer_type=OptimizerType.Adam,
8282
num_epochs=50,
8383
l_rate_scheduler=LRSchedulerType.Step,
8484
l_rate_step_gamma=1.0,
8585
l_rate_multi_step_milestones=None,
86-
**kwargs)
86+
should_validate=False) # validate only after adding kwargs
8787
self.num_classes = 3
88+
self.add_and_validate(kwargs)
8889

8990
def validate(self) -> None:
9091
self.l_rate = 1e-5 if self.use_pretrained_model else 1e-4
@@ -132,7 +133,7 @@ def get_model_train_test_dataset_splits(self, dataset_df: pd.DataFrame) -> Datas
132133
shuffle=True)
133134

134135
# noinspection PyTypeChecker
135-
def get_image_sample_transforms(self) -> ModelTransformsPerExecutionMode:
136+
def get_image_transform(self) -> ModelTransformsPerExecutionMode:
136137
config = load_yaml_augmentation_config(path_linear_head_augmentation_cxr)
137138
train_transforms = Compose(
138139
[DicomPreparation(), create_cxr_transforms_from_config(config, apply_augmentations=True)])

0 commit comments

Comments
 (0)