2018年11月15日 星期四

在 Pytorch Tensor 裡把 RGB 轉為 BGR


非在 影像層次,如果已經在 tensor 層次,要把 RGB 轉為 BGR 也不困難:

# 產生一個亂數 RGB
> t = torch.Tensor(np.arange(12).reshape(4, 3))
# 轉換的排列 RGB --> BGR
> permute = [2, 1, 0] > t[:, permute] tensor([[ 2., 1., 0.], [ 5., 4., 3.], [ 8., 7., 6.], [ 11., 10., 9.]])

就可以轉換成功

2018年11月12日 星期一

GPU 測量好物


Techpowerup

https://www.techpowerup.com/download/techpowerup-gpu-z/