PyTorch官网提供了比较多快速入门的tutorial,http://pytorch.org/tutorials/。最经典的是Deep Learning with PyTorch: A 60 Minute Blitz
Tensors
Tensor是torch中的基本数据结构,类比成numpy的ndarray,但可以用GPU加速计算,如torch.Tensor类型的变量调用a.cuda()即可。
Tensor和numpy的互相转换:
b =
a.numpy()
a = torch.from_numpy(b)
Autograd
自动求导是神经网络训练的必经过程,深度学习框架基本都实现这个模块。