时间:2021-05-29 07:43:21 | 栏目:Python代码 | 点击:次
permute
prediction = input.view(bs, self.num_anchors, self.bbox_attrs, in_h, in_w).permute(0, 1, 3, 4, 2).contiguous()
转置:
import torch x = torch.linspace(1, 9, steps=9).view(3, 3) b=x.permute(1,0) print(b) print(b.permute(1,0))