筛选数据:
x = torch.linspace(1, 4*4*4*4, steps=4*4*4*4).view(4,4,4,4)
print(0,x[0])
print(1,x[1])
print(2,x[2])
print(3,x[3])
print(x.size())
x = x[[3, 2, 3, 2]]
print(0, x[0])
print(1, x[1])
print(2, x[2])
print(3, x[3])
import torch r = torch.linspace(0.0001, 2*3*2, steps=4*3*2) r1=r.view(4,3,2) max_res=torch.max(r1, 1. / r1).max(2) max_res=max_res[0] print(max_res) j = max_res[0] < 4 print(j)



