osbm commited on
Commit
0ff9694
1 Parent(s): 3fadb90

Create nnUNetTrainerV2_Loss_CE_checkpoints.py

Browse files
nnUNetTrainerV2_Loss_CE_checkpoints.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ from nnunet.training.network_training.nnUNet_variants.loss_function.nnUNetTrainerV2_Loss_CE import nnUNetTrainerV2_Loss_CE
17
+
18
+
19
+ class nnUNetTrainerV2_Loss_CE_checkpoints(nnUNetTrainerV2_Loss_CE):
20
+ def __init__(self, plans_file, fold, output_folder=None, dataset_directory=None, batch_dice=True, stage=None,
21
+ unpack_data=True, deterministic=True, fp16=False):
22
+ super().__init__(plans_file, fold, output_folder, dataset_directory, batch_dice, stage, unpack_data,
23
+ deterministic, fp16)
24
+ self.save_latest_only = False
25
+
26
+
27
+ class nnUNetTrainerV2_Loss_CE_checkpoints2(nnUNetTrainerV2_Loss_CE_checkpoints):
28
+ """
29
+ Each run is stored in a folder with the training class name in it. This simply creates a new folder,
30
+ to allow investigating the variability between restarts.
31
+ """
32
+ def __init__(self, plans_file, fold, output_folder=None, dataset_directory=None, batch_dice=True, stage=None,
33
+ unpack_data=True, deterministic=True, fp16=False):
34
+ super().__init__(plans_file, fold, output_folder, dataset_directory, batch_dice, stage, unpack_data,
35
+ deterministic, fp16)
36
+ pass
37
+
38
+
39
+ class nnUNetTrainerV2_Loss_CE_checkpoints3(nnUNetTrainerV2_Loss_CE_checkpoints):
40
+ """
41
+ Each run is stored in a folder with the training class name in it. This simply creates a new folder,
42
+ to allow investigating the variability between restarts.
43
+ """
44
+ def __init__(self, plans_file, fold, output_folder=None, dataset_directory=None, batch_dice=True, stage=None,
45
+ unpack_data=True, deterministic=True, fp16=False):
46
+ super().__init__(plans_file, fold, output_folder, dataset_directory, batch_dice, stage, unpack_data,
47
+ deterministic, fp16)
48
+ pass