File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
segmentation_models_pytorch Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ def __init__(
105105 )
106106
107107 scale_factor = 4 if output_stride == 16 and encoder_depth > 3 else 2
108- self .up = nn .UpsamplingBilinear2d ( scale_factor = scale_factor )
108+ self .up = nn .Upsample ( mode = "bilinear" , scale_factor = scale_factor )
109109
110110 highres_in_channels = encoder_channels [2 ]
111111 highres_out_channels = 48 # proposed by authors of paper
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ def wing_loss(
226226 idx_smaller = diff_abs < width
227227 idx_bigger = diff_abs >= width
228228
229- loss [idx_smaller ] = width * torch .log ( 1 + diff_abs [idx_smaller ] / curvature )
229+ loss [idx_smaller ] = width * torch .log1p ( diff_abs [idx_smaller ] / curvature )
230230
231231 C = width - width * math .log (1 + width / curvature )
232232 loss [idx_bigger ] = loss [idx_bigger ] - C
You can’t perform that action at this time.
0 commit comments