1.numpy的function函数
numpy有一些func函数,这些函数类C,因此速度很快。
https://blog.csdn.net/bqw18744018044/article/details/81158503
2.numpy的arctan函数
out = numpy.arctan(x)
x可以为numpy
值的范围为[-pi/4, pi/4],x为在y轴上的截距,out的结果为(0,x)与x轴(0,1)形成的夹角
3.numpy的arctan2函数
out = numpy.arctan2(x,y)
x,y可以为numpy
值的范围为[-pi, pi],为(x,y)与x轴的夹角
4.pytorch的gather函数
out = torch.gather(x, dim, index)
x是src的原矩阵,dim为0、1,index为0,1矩阵,选择需要的位置,例子如下:
5.torch中view和reshape的区别
view是同一个storage,reshape可能是copy,可能是原storage