小说排行榜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维度转换方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持移动技术网。
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
新手学习Python2和Python3中print不同的用法
Python基于os.environ从windows获取环境变量
网友评论