File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed
segmentation_models_pytorch/encoders Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -97,14 +97,14 @@ densenet201 imagenet 18M
97
97
densenet161 imagenet 26M ✅ ✅ ✅
98
98
inceptionresnetv2 imagenet / imagenet+background 54M ✅ ✅ ✅
99
99
inceptionv4 imagenet / imagenet+background 41M ✅ ✅ ✅
100
- efficientnet-b0 imagenet / advprop 4M ❌ ❌ ✅
101
- efficientnet-b1 imagenet / advprop 6M ❌ ❌ ✅
102
- efficientnet-b2 imagenet / advprop 7M ❌ ❌ ✅
103
- efficientnet-b3 imagenet / advprop 10M ❌ ❌ ✅
104
- efficientnet-b4 imagenet / advprop 17M ❌ ❌ ✅
105
- efficientnet-b5 imagenet / advprop 28M ❌ ❌ ✅
106
- efficientnet-b6 imagenet / advprop 40M ❌ ❌ ✅
107
- efficientnet-b7 imagenet / advprop 63M ❌ ❌ ✅
100
+ efficientnet-b0 imagenet / advprop 4M ❌ ✅ ✅
101
+ efficientnet-b1 imagenet / advprop 6M ❌ ✅ ✅
102
+ efficientnet-b2 imagenet / advprop 7M ❌ ✅ ✅
103
+ efficientnet-b3 imagenet / advprop 10M ❌ ✅ ✅
104
+ efficientnet-b4 imagenet / advprop 17M ❌ ✅ ✅
105
+ efficientnet-b5 imagenet / advprop 28M ❌ ✅ ✅
106
+ efficientnet-b6 imagenet / advprop 40M ❌ ✅ ✅
107
+ efficientnet-b7 imagenet / advprop 63M ❌ ✅ ✅
108
108
mobilenet_v2 imagenet 2M ✅ ✅ ✅
109
109
xception imagenet 20M ✅ ✅ ✅
110
110
timm-efficientnet-b0 imagenet / advprop / noisy-student 4M ✅ ✅ ✅
Original file line number Diff line number Diff line change 35
35
class EfficientNetEncoder (EfficientNet , EncoderMixin ):
36
36
_is_torch_scriptable = False
37
37
38
- # works with torch 2.4.0, but not with torch 2.5.1
39
- _is_torch_compilable = False
40
-
41
38
def __init__ (
42
39
self ,
43
40
stage_idxs : List [int ],
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ def test_compile(self):
212
212
encoder = self .get_tiny_encoder ()
213
213
encoder = encoder .eval ().to (default_device )
214
214
215
+ torch .compiler .reset ()
215
216
compiled_encoder = torch .compile (encoder , fullgraph = True , dynamic = True )
216
217
217
218
if encoder ._is_torch_compilable :
Original file line number Diff line number Diff line change @@ -228,8 +228,10 @@ def test_compile(self):
228
228
self .skipTest ("No diff and not on `main`." )
229
229
230
230
sample = self ._get_sample ().to (default_device )
231
-
232
231
model = self .get_default_model ()
232
+ model = model .eval ().to (default_device )
233
+
234
+ torch .compiler .reset ()
233
235
compiled_model = torch .compile (model , fullgraph = True , dynamic = True )
234
236
235
237
with torch .inference_mode ():
You can’t perform that action at this time.
0 commit comments