pytorch volatile
1 | if args.cuda: |
1 | if args.cuda: |
1 | import os |
x 通常是relu的输出,不符合高斯分布
wx 比较符合高斯分布


感受野的大小大概就是stride的指数倍
使用kill -9
1 | super class |
| Numpy | Tensor | |
|---|---|---|
| repeat | np.repeat(a,16,axis=1) | a.repeat(1,16) |
| tile | np.tile(a,(2,2)) | b = a.expand(1,4)? c = a.view(-1, 1).repeat(1, 16).view(10, -1) |
| transpose | img = np.transpose(img, (0, 3, 1, 2)) | a = a.permute(3,2,1,0) |
| expand | np.expand_dims(x, axis=0) | torch.unsqueeze(x, 1) |
1 | np.repeat([1,2], 4) |