File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 1+ import timm
12from tests .encoders import base
3+ from packaging .version import Version
4+
5+ # check if timm >= 1.0.12
6+ timm_encoders = [
7+ "tu-resnet18" , # for timm universal traditional-like encoder
8+ "tu-convnext_atto" , # for timm universal transformer-like encoder
9+ "tu-darknet17" , # for timm universal vgg-like encoder
10+ ]
11+
12+ if Version (timm .__version__ ) >= Version ("1.0.12" ):
13+ timm_encoders .append ("tu-test_resnet.r160_in1k" )
214
315
416class TestTimmUniversalEncoder (base .BaseEncoderTester ):
5- encoder_names = [
6- "tu-test_resnet.r160_in1k" ,
7- "tu-resnet18" , # for timm universal traditional-like encoder
8- "tu-convnext_atto" , # for timm universal transformer-like encoder
9- "tu-darknet17" , # for timm universal vgg-like encoder
10- ]
17+ encoder_names = timm_encoders
You can’t perform that action at this time.
0 commit comments