Skip to content

Commit cce46ae

Browse files
committed
fix: quick bug fix for the integer div when computing upscaling factors
1 parent e398eba commit cce46ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cellseg_models_pytorch/decoders/unet_decoder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def __init__(
103103
enc_reductions = list(enc_reductions)
104104
enc_reductions.append(1) # add the final resolution
105105
up_factors = torch.tensor(enc_reductions)
106-
up_factors = (up_factors[:-1] // up_factors[1:]).tolist() # consecutive ratios
106+
up_factors = (up_factors[:-1] / up_factors[1:]).tolist() # consecutive ratios
107+
up_factors = [int(f) for f in up_factors]
107108

108109
# set layer-level tuple-args
109110
self.long_skips = self._layer_tuple(long_skip)

0 commit comments

Comments
 (0)