pytorch permute维度转换方法

pytorch permute维度转换方法

permute prediction = input.view(bs, self.num_anchors, self.bbox_attrs, in_h, in_w).permute(0, 1, 3, 4, 2).contiguous() 转置: import torchx = torch.linspace(1, 9, steps=9).view(3, 3)b=x.permute(1,0)...