当前位置: 移动技术网 > IT编程>脚本编程>Python > pytorch permute维度转换方法

pytorch permute维度转换方法

2019年01月08日  | 移动技术网IT编程  | 我要评论

小说排行榜2016前十名,植萃集官网,徐嘉伟

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))

以上这篇pytorch permute维度转换方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持移动技术网。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网