gmastrapas
commited on
Commit
•
626832e
1
Parent(s):
d779277
fix: suppress timm import warning
Browse files- eva_model.py +2 -0
eva_model.py
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
|
6 |
import math
|
7 |
import os
|
|
|
8 |
from functools import partial
|
9 |
|
10 |
import torch
|
@@ -12,6 +13,7 @@ import torch.nn as nn
|
|
12 |
import torch.nn.functional as f
|
13 |
|
14 |
try:
|
|
|
15 |
from timm.models.layers import drop_path as timm_drop_path
|
16 |
from timm.models.layers import to_2tuple, trunc_normal_
|
17 |
except ImportError or ModuleNotFoundError:
|
|
|
5 |
|
6 |
import math
|
7 |
import os
|
8 |
+
import warnings
|
9 |
from functools import partial
|
10 |
|
11 |
import torch
|
|
|
13 |
import torch.nn.functional as f
|
14 |
|
15 |
try:
|
16 |
+
warnings.filterwarnings('ignore', category=FutureWarning, module='timm')
|
17 |
from timm.models.layers import drop_path as timm_drop_path
|
18 |
from timm.models.layers import to_2tuple, trunc_normal_
|
19 |
except ImportError or ModuleNotFoundError:
|