File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def test_clip_resnet50x4_text_load_and_forward(self) -> None:
26
26
)
27
27
# Start & End tokens: 49405, 49406
28
28
x = torch .cat ([torch .tensor ([49405 , 49406 ]), torch .zeros (77 - 2 )])
29
- x = x . int () [None , :]
29
+ x = x [None , :]. long ()
30
30
model = clip_resnet50x4_text (pretrained = True )
31
31
output = model (x )
32
32
self .assertEqual (list (output .shape ), [1 , 640 ])
@@ -43,7 +43,7 @@ def test_clip_resnet50x4_text_forward_cuda(self) -> None:
43
43
+ " not supporting CUDA."
44
44
)
45
45
x = torch .cat ([torch .tensor ([49405 , 49406 ]), torch .zeros (77 - 2 )]).cuda ()
46
- x = x . int () [None , :]
46
+ x = x [None , :]. long ()
47
47
model = clip_resnet50x4_text (pretrained = True ).cuda ()
48
48
output = model (x )
49
49
@@ -57,7 +57,7 @@ def test_clip_resnet50x4_text_jit_module(self) -> None:
57
57
+ " test due to insufficient Torch version."
58
58
)
59
59
x = torch .cat ([torch .tensor ([49405 , 49406 ]), torch .zeros (77 - 2 )])
60
- x = x . int () [None , :]
60
+ x = x [None , :]. long ()
61
61
model = clip_resnet50x4_text (pretrained = True )
62
62
jit_model = torch .jit .script (model )
63
63
output = jit_model (x )
You can’t perform that action at this time.
0 commit comments