Skip to content

Commit 257da0b

Browse files
committed
Fix scripting
1 parent 7157501 commit 257da0b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

segmentation_models_pytorch/base/utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import torch
22

33

4+
@torch.jit.unused
45
def is_torch_compiling():
56
try:
67
return torch.compiler.is_compiling()

segmentation_models_pytorch/encoders/timm_universal.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def output_stride(self) -> int:
194194
Returns:
195195
int: The effective output stride.
196196
"""
197-
return min(self._output_stride, 2**self._depth)
197+
return int(min(self._output_stride, 2**self._depth))
198198

199199
def load_state_dict(self, state_dict, **kwargs):
200200
# for compatibility of weights for

0 commit comments

Comments
 (0)