File tree 3 files changed +9
-7
lines changed
3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 28
28
python -m pip install --upgrade pip
29
29
python -m pip install pytest
30
30
python -m pip install wheel
31
- python -m pip install torch==2.5 .0 torchvision==0.19.0 --index-url https://download.pytorch.org/whl/cpu
31
+ python -m pip install torch==2.4 .0 torchvision==0.19.0 --index-url https://download.pytorch.org/whl/cpu
32
32
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33
33
- name : Test with pytest
34
34
run : |
Original file line number Diff line number Diff line change 6
6
import torch
7
7
import packaging .version as pkg_version
8
8
9
- if pkg_version .parse (torch .__version__ ) < pkg_version .parse ('2.5' ):
10
- print ('nested tensor NaViT was tested on pytorch 2.5' )
11
-
12
9
from torch import nn , Tensor
13
10
import torch .nn .functional as F
14
11
from torch .nn import Module , ModuleList
@@ -152,6 +149,11 @@ def __init__(
152
149
token_dropout_prob : float | None = None
153
150
):
154
151
super ().__init__ ()
152
+
153
+ if pkg_version .parse (torch .__version__ ) < pkg_version .parse ('2.5' ):
154
+ print ('nested tensor NaViT was tested on pytorch 2.5' )
155
+
156
+
155
157
image_height , image_width = pair (image_size )
156
158
157
159
# what percent of tokens to dropout
Original file line number Diff line number Diff line change 6
6
import torch
7
7
import packaging .version as pkg_version
8
8
9
- if pkg_version .parse (torch .__version__ ) < pkg_version .parse ('2.5' ):
10
- print ('nested tensor NaViT was tested on pytorch 2.5' )
11
-
12
9
from torch import nn , Tensor
13
10
import torch .nn .functional as F
14
11
from torch .nn import Module , ModuleList
@@ -169,6 +166,9 @@ def __init__(
169
166
super ().__init__ ()
170
167
image_height , image_width = pair (image_size )
171
168
169
+ if pkg_version .parse (torch .__version__ ) < pkg_version .parse ('2.5' ):
170
+ print ('nested tensor NaViT was tested on pytorch 2.5' )
171
+
172
172
# what percent of tokens to dropout
173
173
# if int or float given, then assume constant dropout prob
174
174
# otherwise accept a callback that in turn calculates dropout prob from height and width
You can’t perform that action at this time.
0 commit comments