Skip to main content

Code Compare Panel

Spot differences hiding in your code
Created on September 8|Last edited on September 9

Expand 119 lines ...
120
config.framework = "fast.ai"    # AI framework used (for when we create other versions)
120
config.framework = "fast.ai"    # AI framework used (for when we create other versions)
121
config.img_size = (360, 640)    # dimensions of resized image - can be 1 dim or tuple
121
config.img_size = (360, 640)    # dimensions of resized image - can be 1 dim or tuple
122
122
123
-
config.batch_size = 
8
           # Batch size during training
123
+
config.batch_size = 
7
           # Batch size during training
124
config.epochs = 10            # Number of epochs for training
124
config.epochs = 10            # Number of epochs for training
125
125
126
-
config.encoder = "resnet
18" #resnet
34"
126
+
config.encoder = "resnet
34"
127
if config.encoder == "resnet18":
127
if config.encoder == "resnet18":
128
  encoder = models.resnet18     # encoder of unet (contracting path)
128
  encoder = models.resnet18     # encoder of unet (contracting path)
129
elif config.encoder == "resnet34":
129
elif config.encoder == "resnet34":
130
  encoder = models.resnet34
130
  encoder = models.resnet34
Expand 13 lines ...
144
# SWEEPS UNCOMMENT
144
# SWEEPS UNCOMMENT
145
-
config.weight_decay = 0.0
9
7
 #0.097     # weight decay applied on layers
145
+
config.weight_decay = 0.0
6
7
31
 #0.097     # weight decay applied on layers
146
config.bn_weight_decay = True # whether weight decay is applied on batch norm layers
146
config.bn_weight_decay = True # whether weight decay is applied on batch norm layers
147
config.one_cycle = True         # use the "1cycle" policy -> https://arxiv.org/abs/1803.09820
147
config.one_cycle = True         # use the "1cycle" policy -> https://arxiv.org/abs/1803.09820
148
# SWEEPS UNCOMMENT
148
# SWEEPS UNCOMMENT
149
-
config.learning_rate = 0.001
 #0
9084 #0
.001     # learning rate
149
+
config.learning_rate = 0.001
367
 #0
.001     # learning rate
150
save_model = False
150
save_model = False
151
151
152
# Custom values to filter runs
152
# Custom values to filter runs
153
# SWEEPS UNCOMMENT
153
# SWEEPS UNCOMMENT
154
config.training_stages = 2
154
config.training_stages = 2
155
155
165
-
src = (SegmentationItemList.from_folder(path_img).use_partial_data(0.
5
)
165
+
src = (SegmentationItemList.from_folder(path_img).use_partial_data(0.
2
)
Expand 9 lines ...
166
#src = (SegmentationItemList.from_folder(path_img)
166
#src = (SegmentationItemList.from_folder(path_img)
167
       .split_by_folder(train='train', valid='val')
167
       .split_by_folder(train='train', valid='val')
168
       .label_from_func(get_y_fn, classes=segmentation_classes))
168
       .label_from_func(get_y_fn, classes=segmentation_classes))
169
169
170
# Resize, augment, load in batch & normalize (so we can use pre-trained networks)
170
# Resize, augment, load in batch & normalize (so we can use pre-trained networks)
171
data = (src.transform(get_transforms(), size=config.img_size, tfm_y=True)
171
data = (src.transform(get_transforms(), size=config.img_size, tfm_y=True)
172
        .databunch(bs=config.batch_size)
172
        .databunch(bs=config.batch_size)
Expand 136 lines ...
Run set
2