Pytorch学习入门指导教程(入门路线图,附推荐工程)
接触Pytorch一年有余,从小菜鸟变成了大菜鸟,现总结下经验,供大家提供一份入门路线图。
1)学习官方Beginner Tutorials,有个大概了解(https://pytorch.org/tutorials/index.html);
2)学习Imagenet分类demo逐行深入理解(https://github.com/pytorch/examples/tree/master/imagenet),并考虑做一个适合自己的base script,以后就在上面改就行(例如我的https://github.com/MichaelLiang12/PFNet-FGVC/blob/master/PFNet_train_test.py);
3)对框架已经基本了解,结合自身方向,找一个主流论文(pytorch code released,例如Mask RCNN https://github.com/matterport/Mask_RCNN),一般大家创新的部分是DataLoader,Network Definition,Optimization等,利用好Github提问,doc(https://pytorch.org/docs/stable/index.html),discuss(https://discuss.pytorch.org/)和Google,弄懂他的项目,并开始写自己的项目(可以把他的代码迁移到自己的base script,或者直接在他上面改)
4)进一步提升,例如cuda加速等,学习Advanced Tutorials(https://pytorch.org/tutorials/index.html),可以参考SPN,写的简洁清晰(https://github.com/yeezhu/SPN.pytorch)
经过以上四步,Pytorch就是我们的得力工具,大部分模型一个小时到一两天就能写出来,阻挡发论文的就是Idea了。。