You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_reshape.py 292 B

2 years ago
123456789
  1. import torch
  2. cls_score_original = torch.rand(8,11,9).cuda()
  3. print(cls_score_original)
  4. cls_score = cls_score_original.permute(0, 2, 1).reshape(-1, 11).contiguous()
  5. print(cls_score)
  6. cls_score = cls_score.reshape(8,9,11).permute(0, 2, 1)
  7. print(cls_score)
  8. print(cls_score_original == cls_score)

No Description

Contributors (3)