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
9797densenet161 imagenet 26M ✅ ✅ ✅
9898inceptionresnetv2 imagenet / imagenet+background 54M ✅ ✅ ✅
9999inceptionv4 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 ❌ ✅ ✅
108108mobilenet_v2 imagenet 2M ✅ ✅ ✅
109109xception imagenet 20M ✅ ✅ ✅
110110timm-efficientnet-b0 imagenet / advprop / noisy-student 4M ✅ ✅ ✅
Original file line number Diff line number Diff line change 3535class EfficientNetEncoder (EfficientNet , EncoderMixin ):
3636 _is_torch_scriptable = False
3737
38- # works with torch 2.4.0, but not with torch 2.5.1
39- _is_torch_compilable = False
40-
4138 def __init__ (
4239 self ,
4340 stage_idxs : List [int ],
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ def test_compile(self):
212212 encoder = self .get_tiny_encoder ()
213213 encoder = encoder .eval ().to (default_device )
214214
215+ torch .compiler .reset ()
215216 compiled_encoder = torch .compile (encoder , fullgraph = True , dynamic = True )
216217
217218 if encoder ._is_torch_compilable :
Original file line number Diff line number Diff line change @@ -228,8 +228,10 @@ def test_compile(self):
228228 self .skipTest ("No diff and not on `main`." )
229229
230230 sample = self ._get_sample ().to (default_device )
231-
232231 model = self .get_default_model ()
232+ model = model .eval ().to (default_device )
233+
234+ torch .compiler .reset ()
233235 compiled_model = torch .compile (model , fullgraph = True , dynamic = True )
234236
235237 with torch .inference_mode ():
You can’t perform that action at this time.
0 commit comments