torch.LongTensor转换成one hot tensor编码

import torch ''' pytorch0.4.0及以上的高版本,加上pytorch0.2.0都支持torch.Tensor._scatter 功能实现将torch.LongTensor编码成 one-hot vector的功能 ''' rois_label=torch.tensor( [[0,1,0,5,2,7,4,3,1,2]] )#假设当前的ground truth boxe
相关文章
相关标签/搜索