1.py 365 Bytes
Newer Older
zhenyi's avatar
zhenyi committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import torch
import torchvision

print(torch.__version__)
print(torchvision.__version__)

print(torch.cuda.is_available())

print(torch.cuda.device_count())

print(torch.cuda.get_device_name(0))


a=torch.Tensor([[1,1,2,2],[1,1,3.100001,3],[1,1,3.1,3]])

b=torch.Tensor([0.9,0.98,0.980005])

from torchvision.ops import nms
ccc=nms(a,b,0.4)
print(ccc)
print(a[ccc])