测试最近邻差值的结果比较(仅结果展示)

测试最近邻差值的结果比较(放大的结果符合原始size的倍数与不符合时的比较。)

将hw方向上的size :3*3,转为4*4,5*5,6*6,有什么样式。

a=torch.arange(18,dtype=torch.float32).reshape(1,2,3,3)
aa= F.interpolate(a, size= (4,4), mode='nearest')
bb= F.interpolate(a, size= (5,5), mode='nearest')
cc= F.interpolate(a, size= (6,6), mode='nearest')

结果展示:

 

from torch.nn import functional as F
a=torch.arange(32,dtype=torch.float32).reshape(1,2,4,4)
cc= F.interpolate(a, size= (6,6), mode='nearest')
print(cc)

 

猜你喜欢

转载自blog.csdn.net/QYJ_WORKHARDING/article/details/127951485