-
感知器
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/basic-ml/perceptron.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/basic-ml/perceptron.ipynb
-
逻辑回归
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/basic-ml/logistic-regression.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/basic-ml/logistic-regression.ipynb
-
Softmax 回归(多项逻辑回归)
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/basic-ml/softmax-regression.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/basic-ml/softmax-regression.ipynb
多层感知器
-
多层感知器
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mlp/mlp-basic.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mlp/mlp-basic.ipynb
-
具有 Dropout 的多层感知器
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mlp/mlp-dropout.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mlp/mlp-dropout.ipynb
-
具有批量归一化的多层感知器
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mlp/mlp-batchnorm.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mlp/mlp-batchnorm.ipynb
-
具有从头开始反向传播的多层感知器
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mlp/mlp-lowlevel.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mlp/mlp-fromscratch__sigmoid-mse.ipynb
卷积神经网络基本
-
卷积神经网络
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/cnn/cnn-basic.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-basic.ipynb
-
具有 He 初始化的卷积神经网络
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-he-init.ipynb
概念
-
用等效卷积层替换全连接
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/fc-to-conv.ipynb
全卷积
-
全卷积神经网络
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-allconv.ipynb
AlexNet
-
CIFAR-10 上的 AlexNet
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-alexnet-cifar10.ipynb
VGG
-
卷积神经网络 VGG-16
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/cnn/cnn-vgg16.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-vgg16.ipynb
-
在 CelebA 上训练的 VGG-16 性别分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-vgg16-celeba.ipynb
-
卷积神经网络 VGG-19
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-vgg19.ipynb
ResNet
-
ResNet 与残差块
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/resnet-ex-1.ipynb
-
在 MNIST 上训练的 ResNet-18 数字分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet18-mnist.ipynb
-
在 CelebA 上训练的 ResNet-18 性别分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet18-celeba-dataparallel.ipynb
-
在 MNIST 上训练的 ResNet-34 数字分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet34-mnist.ipynb
-
在 CelebA 上训练的 ResNet-34 性别分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet34-celeba-dataparallel.ipynb
-
在 MNIST 上训练的 ResNet-50 数字分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet50-mnist.ipynb
-
在 CelebA 上训练的 ResNet-50 性别分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet50-celeba-dataparallel.ipynb
-
在 CelebA 上训练的 ResNet-101 性别分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet101-celeba.ipynb
-
在 CIFAR-10 上训练的 ResNet-101
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet101-cifar10.ipynb
-
在 CelebA 上训练的 ResNet-152 性别分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet152-celeba.ipynb
网络中的网络
-
CIFAR-10 分类器网络中的网络
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/nin-cifar10.ipynb
度量学习
-
具有多层感知器的孪生网络
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/metric/siamese-1.ipynb
自编码器全连接自编码器
-
自编码器
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/autoencoder/ae-basic.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-basic.ipynb
卷积自编码器
-
具有解卷积 / 转置卷积的卷积自编码器
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/autoencoder/ae-deconv.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-deconv.ipynb
-
具有解卷积(不具有池化操作)的卷积自编码器
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/autoencoder/ae-conv-nneighbor.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-conv-nneighbor.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-deconv-nopool.ipynb
具有最近邻插值的卷积自编码器
-
在 CelebA 上训练的具有最近邻插值的卷积自编码器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-conv-nneighbor-celeba.ipynb
-
在 Quickdraw 上训练的具有最近邻插值的卷积自编码器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-conv-nneighbor-quickdraw-1.ipynb
变分自编码器
-
变分自编码器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-conv-var.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-var.ipynb
卷积变分自编码器
条件变分自编码器
-
条件变分自编码器(具有重构损失中的标签)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-cvae.ipynb
-
条件变分自编码器(不具有重构损失中的标签)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-cvae_no-out-concat.ipynb
-
卷积条件变分自编码器(具有重构损失中的标签)
PYTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-cnn-cvae.ipynb
-
卷积条件变分自编码器(不具有重构损失中的标签)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/autoencoder/ae-cnn-cvae_no-out-concat.ipynb
生成对抗网络
-
MNIST 上的全连接生成对抗网络
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/gan/gan.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/gan/gan.ipynb
-
MNIST 上的卷积生成对抗网络
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/gan/gan-conv.ipynb
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/gan/gan-conv.ipynb
-
MNIST 上具有标签平滑的卷积生成对抗网络
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/gan/gan-conv-smoothing.ipynb
递归神经网络多对一:情感分析 / 分类
-
简单的单层递归神经网络(IMDB)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/rnn_simple_imdb.ipynb
-
打包序列以忽略填充字符的简单单层递归神经网络(IMDB)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/rnn_simple_packed_imdb.ipynb
-
具有长短期记忆网络单元的递归神经网络(IMDB)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/rnn_lstm_packed_imdb.ipynb
-
具有长短期记忆网络单元和经预训练的 GloVe 词向量的递归神经网络(IMDB)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/rnn_lstm_packed_own_csv_imdb.ipynb
-
具有长短期记忆网络单元和 CSV 格式的自有数据集的递归神经网络(IMDB)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/rnn_lstm_packed_own_csv_imdb.ipynb
-
具有 GRU 单元的递归神经网络(IMDB)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/rnn_gru_packed_imdb.ipynb
-
多层双向递归神经网络(IMDB)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/rnn_gru_packed_imdb.ipynb
多对多 / 序列到序列
-
为生成新文本(Charles Dickens)的简单字符递归神经网络
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/char_rnn-charlesdickens.ipynb
序数回归
-
序数回归卷积神经网络——CORAL w. ResNet34 on AFAD-Lite
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/ordinal/ordinal-cnn-coral-afadlite.ipynb
-
序数回归卷积神经网络——Niu et al. 2016 w. ResNet34 on AFAD-Lite
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/ordinal/ordinal-cnn-niu-afadlite.ipynb
-
序数回归卷积神经网络——Beckham and Pal 2016 w. ResNet34 on AFAD-Lite
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/ordinal/ordinal-cnn-beckham2016-afadlite.ipynb
要诀与技巧
-
周期学习率
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/tricks/cyclical-learning-rate.ipynb
PyTorch 工作流和机制自定义数据集
-
为自定义数据集使用 PyTorch 数据集加载实用程序——CSV 文件转换为 HDF5
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/custom-data-loader-csv.ipynb
-
为自定义数据集使用 PyTorch 数据集加载使用程序——来自 CelebA 的面部图像
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/custom-data-loader-celeba.ipynb
-
为自定义数据集使用 PyTorch 数据集加载使用程序——来自 Quickdraw 的图像
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/custom-data-loader-quickdraw.ipynb
-
为自定义数据集使用 PyTorch 数据集加载使用程序——来自街景门牌号(SVHN)数据集的图像
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/custom-data-loader-svhn.ipynb
-
为自定义数据集使用 PyTorch 数据集加载使用程序——亚洲人面部数据集(AFAD)
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/custom-data-loader-afad.ipynb
-
为自定义数据集使用 PyTorch 数据集加载使用程序——历史彩色图像
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/custom-data-loader_dating-historical-color-images.ipynb
训练与预处理
-
生成验证集拆分
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/validation-splits.ipynb
-
具有固定内存的数据加载
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-resnet34-cifar10-pinmem.ipynb
-
图像标准化
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-standardized.ipynb
-
图像转换示例
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/torchvision-transform-examples.ipynb
-
具有自己的文本文件的 Char-RNN
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/char_rnn-charlesdickens.ipynb
-
具有自己的 CSV 文件的情感分类递归神经网络
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/rnn/rnn_lstm_packed_own_csv_imdb.ipynb
并行计算
-
使用数据并行的多 GPU——VGG-16 CelebA 上的性别分类器
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/cnn/cnn-vgg16-celeba-data-parallel.ipynb
其他
-
顺序 API 和钩子
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/mlp-sequential.ipynb
-
层内权重共享
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/cnn-weight-sharing.ipynb
-
只使用 Matplotlib 在 Jupyter Notebook 绘制实时训练性能
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/plot-jupyter-matplotlib.ipynb
Autograd
-
在 PyTorch 中获取中间变量的梯度
PyTorch:https://github.com/rasbt/deeplearning-models/blob/master/pytorch_ipynb/mechanics/manual-gradients.ipynb
TensorFlow 工作流和机制自定义数据集
-
为 Mini-batch 训练使用 NumPy NPZ Archives 进行组块图像数据集
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mechanics/image-data-chunking-npz.ipynb
-
为 Mini-batch 使用 HDF5 进行存储图像数据集
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mechanics/image-data-chunking-hdf5.ipynb
-
使用输入管道从 TFRecords 文件读取数据
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mechanics/tfrecords.ipynb
-
使用 Queue Runners 从硬盘直接馈入图像
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mechanics/file-queues.ipynb
-
使用 TensorFlow 的数据集 API
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mechanics/dataset-api.ipynb
训练和预处理
-
保存和加载训练过的模型——从 TensorFlow 检查点文件和 NumPy NPZ Archives
TensorFlow:https://github.com/rasbt/deeplearning-models/blob/master/tensorflow1_ipynb/mechanics/saving-and-reloading-models.ipynb