pytorch-github资源

原文地址: http://www.sohu.com/a/164171974_741733
本文收集了大量基于 PyTorch 实现的代码链接,其中有适用于深度学习新手的“入门指导系列”,也有适用于老司机的论文代码实现,包括 Attention Based CNN、A3C、WGAN等等。所有代码均按照所属技术领域分类,包括机器视觉/图像相关、自然语言处理相关、强化学习相关等等。所以如果你打算入手这风行一世的 PyTorch 技术,那么就快快收藏本文吧!

PyTorch 是什么?

PyTorch即 Torch 的 Python 版本。Torch 是由 Facebook 发布的深度学习框架,因支持动态定义计算图,相比于 Tensorflow 使用起来更为灵活方便,特别适合中小型机器学习项目和深度学习初学者。但因为 Torch 的开发语言是Lua,导致它在国内一直很小众。所以,在千呼万唤下,PyTorch应运而生!PyTorch 继承了 Troch 的灵活特性,又使用广为流行的 Python 作为开发语言,所以一经推出就广受欢迎!

目录:

入门系列教程
入门实例
图像、视觉、CNN相关实现
对抗生成网络、生成模型、GAN相关实现
机器翻译、问答系统、NLP相关实现
先进视觉推理系统
深度强化学习相关实现
通用神经网络高级应用

入门系列教程

PyTorch Tutorials
https://github.com/MorvanZhou/PyTorch-Tutorial.git
著名的“莫烦”PyTorch系列教程的源码。
Deep Learning with PyTorch: a 60-minute blitz
http://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html
PyTorch官网推荐的由网友提供的60分钟教程,本系列教程的重点在于介绍PyTorch的基本原理,包括自动求导,神经网络,以及误差优化API。
Simple examples to introduce PyTorch
https://github.com/jcjohnson/pytorch-examples.git
由网友提供的PyTorch教程,通过一些实例的方式,讲解PyTorch的基本原理。内容涉及Numpy、自动求导、参数优化、权重共享等。

入门实例

Ten minutes pyTorch Tutorial
https://github.com/SherlockLiao/pytorch-beginner.git
知乎上“十分钟学习PyTorch“系列教程的源码。
Official PyTorch Examples
https://github.com/pytorch/examples
官方提供的实例源码,包括以下内容:
MNIST Convnets
Word level Language Modeling using LSTM RNNs
Training Imagenet Classifiers with Residual Networks
Generative Adversarial Networks (DCGAN)
Variational Auto-Encoders
Superresolution using an efficient sub-pixel convolutional neural network
Hogwild training of shared ConvNets across multiple processes on MNIST
Training a CartPole to balance in OpenAI Gym with actor-critic
Natural Language Inference (SNLI) with GloVe vectors, LSTMs, and torchtext
Time sequence prediction - create an LSTM to learn Sine waves
PyTorch Tutorial for Deep Learning Researchers
https://github.com/yunjey/pytorch-tutorial.git
据说是提供给深度学习科研者们的PyTorch教程←_←。教程中的每个实例的代码都控制在30行左右,简单易懂,内容如下:
PyTorch Basics
Linear Regression
Logistic Regression
Feedforward Neural Network
Convolutional Neural Network
Deep Residual Network
Recurrent Neural Network
Bidirectional Recurrent Neural Network
Language Model (RNN-LM)
Generative Adversarial Network
Image Captioning (CNN-RNN)
Deep Convolutional GAN (DCGAN)
Variational Auto-Encoder
Neural Style Transfer
TensorBoard in PyTorch
PyTorch-playground
https://github.com/aaron-xichen/pytorch-playground.git
PyTorch初学者的Playground,在这里针对一下常用的数据集,已经写好了一些模型,所以大家可以直接拿过来玩玩看,目前支持以下数据集的模型。
mnist, svhn
cifar10, cifar100
stl10
alexnet
vgg16, vgg16_bn, vgg19, vgg19_bn
resnet18, resnet34, resnet50, resnet101, resnet152
squeezenet_v0, squeezenet_v1
inception_v3

图像、视觉、CNN相关实现

PyTorch-FCN
https://github.com/wkentaro/pytorch-fcn.git
FCN(Fully Convolutional Networks implemented) 的PyTorch实现。
Attention Transfer
https://github.com/szagoruyko/attention-transfer.git
论文 “Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer” 的PyTorch实现。
Wide ResNet model in PyTorch
https://github.com/szagoruyko/functional-zoo.git
一个PyTorch实现的 ImageNet Classification 。
CRNN for image-based sequence recognition
https://github.com/bgshih/crnn.git
这个是 Convolutional Recurrent Neural Network (CRNN) 的 PyTorch 实现。CRNN 由一些CNN,RNN和CTC组成,常用于基于图像的序列识别任务,例如场景文本识别和OCR。
Scaling the Scattering Transform: Deep Hybrid Networks
https://github.com/edouardoyallon/pyscatwave.git
使用了“scattering network”的CNN实现,特别的构架提升了网络的效果。
Conditional Similarity Networks (CSNs)
https://github.com/andreasveit/conditional-similarity-networks.git
《Conditional Similarity Networks》的PyTorch实现。
Multi-style Generative Network for Real-time Transfer
https://github.com/zhanghang1989/PyTorch-Style-Transfer.git
MSG-Net 以及 Neural Style 的 PyTorch 实现。
Big batch training
https://github.com/eladhoffer/bigBatch.git
《Train longer, generalize better: closing the generalization gap in large batch training of neural networks》的 PyTorch 实现。
CortexNet
https://github.com/e-lab/pytorch-CortexNet.git
一个使用视频训练的鲁棒预测深度神经网络。
Neural Message Passing for Quantum Chemistry
https://github.com/priba/nmp_qc.git
论文《Neural Message Passing for Quantum Chemistry》的PyTorch实现,好像是讲计算机视觉下的神经信息传递。

对抗生成网络、生成模型、GAN相关实现

Generative Adversarial Networks (GANs) in PyTorch
https://github.com/devnag/pytorch-generative-adversarial-networks.git
一个非常简单的由PyTorch实现的对抗生成网络
DCGAN & WGAN with Pytorch
https://github.com/chenyuntc/pytorch-GAN.git
由中国网友实现的DCGAN和WGAN,代码很简洁。
Official Code for WGAN
https://github.com/martinarjovsky/WassersteinGAN.git
WGAN的官方PyTorch实现。
DiscoGAN in PyTorch
https://github.com/carpedm20/DiscoGAN-pytorch.git
《Learning to Discover Cross-Domain Relations with Generative Adversarial Networks》的 PyTorch 实现。
Adversarial Generator-Encoder Network
https://github.com/DmitryUlyanov/AGE.git
《Adversarial Generator-Encoder Networks》的 PyTorch 实现。
CycleGAN and pix2pix in PyTorch
https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix.git
图到图的翻译,著名的 CycleGAN 以及 pix2pix 的PyTorch 实现。
Weight Normalized GAN
https://github.com/stormraiser/GAN-weight-norm.git
《On the Effects of Batch and Weight Normalization in Generative Adversarial Networks》的 PyTorch 实现。

机器翻译、问答系统、NLP相关实现

DeepLearningForNLPInPytorch
https://github.com/rguthrie3/DeepLearningForNLPInPytorch.git
一套以 NLP 为主题的 PyTorch 基础教程。本教程使用Ipython Notebook编写,看起来很直观,方便学习。
Practial Pytorch with Topic RNN & NLP
https://github.com/spro/practical-pytorch
以 RNN for NLP 为出发点的 PyTorch 基础教程,分为“RNNs for NLP”和“RNNs for timeseries data”两个部分。
PyOpenNMT: Open-Source Neural Machine Translation
https://github.com/OpenNMT/OpenNMT-py.git
一套由PyTorch实现的机器翻译系统。(包含,Attention Model)
Deal or No Deal? End-to-End Learning for Negotiation Dialogues
https://github.com/facebookresearch/end-to-end-negotiator.git
Facebook AI Research 论文《Deal or No Deal? End-to-End Learning for Negotiation Dialogues》的 PyTorch 实现。
Attention is all you need: A Pytorch Implementation
https://github.com/jadore801120/attention-is-all-you-need-pytorch.git
Google Research 著名论文《Attention is all you need》的PyTorch实现。Attention Model(AM)。
Improved Visual Semantic Embeddings
https://github.com/fartashf/vsepp.git
一种从图像中检索文字的方法,来自论文:《VSE++: Improved Visual-Semantic Embeddings》。
Reading Wikipedia to Answer Open-Domain Questions
https://github.com/facebookresearch/DrQA.git
一个开放领域问答系统DrQA的PyTorch实现。
Structured-Self-Attentive-Sentence-Embedding
https://github.com/ExplorerFreda/Structured-Self-Attentive-Sentence-Embedding.git
IBM 与 MILA 发表的《A Structured Self-Attentive Sentence Embedding》的开源实现。

先进视觉推理系统

Visual Question Answering in Pytorch
https://github.com/Cadene/vqa.pytorch.git
一个PyTorch实现的优秀视觉推理问答系统,是基于论文《MUTAN: Multimodal Tucker Fusion for Visual Question Answering》实现的。项目中有详细的配置使用方法说明。
Clevr-IEP
https://github.com/facebookresearch/clevr-iep.git
Facebook Research 论文《Inferring and Executing Programs for Visual Reasoning》的PyTorch实现,讲的是一个可以基于图片进行关系推理问答的网络。

深度强化学习相关实现

Deep Reinforcement Learning withpytorch & visdom
https://github.com/onlytailei/pytorch-rl.git
多种使用PyTorch实现强化学习的方法。
Value Iteration Networks in PyTorch
https://github.com/onlytailei/Value-Iteration-Networks-PyTorch.git
Value Iteration Networks (VIN) 的PyTorch实现。
A3C in PyTorch
https://github.com/onlytailei/A3C-PyTorch.git
Adavantage async Actor-Critic (A3C) 的PyTorch实现。

通用神经网络高级应用

PyTorch-meta-optimizer
https://github.com/ikostrikov/pytorch-meta-optimizer.git
论文《Learning to learn by gradient descent by gradient descent》的PyTorch实现。
OptNet: Differentiable Optimization as a Layer in Neural Networks
https://github.com/locuslab/optnet.git
论文《Differentiable Optimization as a Layer in Neural Networks》的PyTorch实现。
Task-based End-to-end Model Learning
https://github.com/locuslab/e2e-model-learning.git
论文《Task-based End-to-end Model Learning》的PyTorch实现。
DiracNets
https://github.com/szagoruyko/diracnets.git
不使用“Skip-Connections”而搭建特别深的神经网络的方法。
ODIN: Out-of-Distribution Detector for Neural Networks
https://github.com/ShiyuLiang/odin-pytorch.git
这是一个能够检测“分布不足”(Out-of-Distribution)样本的方法的PyTorch实现。当“true positive rate”为95%时,该方法将DenseNet(适用于CIFAR-10)的“false positive rate”从34.7%降至4.3%。
Accelerate Neural Net Training by Progressively Freezing Layers
https://github.com/ajbrock/FreezeOut.git
一种使用“progressively freezing layers”来加速神经网络训练的方法。
Efficient_densenet_pytorch
https://github.com/gpleiss/efficient_densenet_pytorch.git
DenseNets的PyTorch实现,优化以节省GPU内存。

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,560评论 4 361
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,104评论 1 291
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,297评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,869评论 0 204
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,275评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,563评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,833评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,543评论 0 197
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,245评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,512评论 2 244
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,011评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,359评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,006评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,062评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,825评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,590评论 2 273
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,501评论 2 268

推荐阅读更多精彩内容