1、pytorch
torch.arange
torch.FloatTensor
torch.no_grad()
torch.load
torch.load
torch.set_printoptions
torch.max()与torch.argmax()torch.min()
torch.from_numpy()
nonzero()
torch.squeeze()
torch.unsqueeze()
size()与shape
view
torch.cat
沿着某一维度扩展,一般在route层使用
permute
repeat
torch.stack
张量布尔索引:比较
torch.stack
torch.sigmoid
torch.exp
torch.FloatTensor
torch.zeros_like torch.zeros
torch.clamp
torch.log
torch.sqrt
torch.sort
torch.save
torch.manual_seed
2、numpy
np.fromfile
np.zeros np.zeros_like np.eye np.ones
np.array
np.bincount
np.mean
np.set_printoptions
np.random.seed
np.loadtxt
np.argsort
np.unique
np.cumsum()
np.argsort()
np.concatenate((a,b,c),axis=0)
沿着某一维度数据拼接
np.sum
np.where
np.maximum
np.ascontiguousarray
np.random.permutation
np.clip(x,min,max)
将数据x限制在(min,max)范围内
np.fliplr
np.flipud
np.stack