best traffic acc (50% data))
Code Compare Panel
Spot differences hiding in your code
Created on September 8|Last edited on September 9
Comment
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 = | 123 | + | config.batch_size = |
124 | config.epochs = 10 # Number of epochs for training | 124 | config.epochs = 10 # Number of epochs for training | ||
125 | 125 | ||||
126 | - | config.encoder = "resnet18" #resnet | 126 | + | config.encoder = "resnet |
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 |
| 144 |
| ||
145 | - | config.weight_decay = 0.0 | 145 | + | config.weight_decay = 0.0 |
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 |
| 148 |
| ||
149 | - | config.learning_rate = 0.001 | 149 | + | config.learning_rate = 0.001 |
150 | save_model = False | 150 | save_model = False | ||
151 | 151 | ||||
152 |
| 152 |
| ||
153 |
| 153 |
| ||
154 | config.training_stages = 2 | 154 | config.training_stages = 2 | ||
155 | 155 | ||||
165 | - | src = (SegmentationItemList.from_folder(path_img).use_partial_data(0. | 165 | + | src = (SegmentationItemList.from_folder(path_img).use_partial_data(0. |
Expand 9 lines ... | |||||
166 |
| 166 |
| ||
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 |
| 170 |
| ||
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
Add a comment