/PyTorchBasic

This repository provides tutorial for deep learning researchers and PyTorch beginners to learn and practice PyTorch.

Primary LanguagePython

pytorch logo

PyTorch Basic Practice for Beginners

This repository provides tutorial for deep learning researchers and PyTorch beginners to learn and practice PyTorch. Introduced from the foundation of PyTorch, this repo includes five parts of model training, including data, model, loss function, optimizer and iterative training visualization. In addition to the basic use of PyTorch, there are some classic hands-on projects which be used to practice, most of which are connected to Computer Vision, and one of which is related to Natural Language Processing.

Environment

the codes have been tested in:

  • Python 3.8.13
  • PyTorch 1.10.1
  • CUDA 11.1
  • Pandas 1.5.1
  • Matplotlib 3.5.0

Complete dependencies can be installed by executing the command pip install -r requirements.txt.

Table of Contents

  1. Basic 🚀️
  2. Data Process 🍾
  3. Modules 🍷
  4. LR, Loss and Optim 🍭
  5. Visualization and Hook 🍦
  6. Regularization 👀️
  7. Utilities 🍹
  8. Applications in CV and NLP 🍖
  9. Data 🍜
  10. Models 👍
    • LeNet
    • UNet
    • DCGAN
    • RNN
  11. Tools 🍬
    • custom datasets
    • other common tool functions

Run Example

The following are some running examples:

  • Loss Curve of Cat and Dog Classification with LeNet

    lenet_cat_dog

  • Weight of Convolution Layer in LeNet from Tensorboard

    lenet_tensorboard

  • Ant and Bee Classification with ResNet

    resnet_ant_bee

  • Portrait Matting with UNet

    unet_portrait_matting

  • Object Detection with FasterRCNN

    fasterrcnn_detection

  • Face Generation with GAN

    gan_face_generation

  • Name Classification with RNN

    rnn_name_classification

Data

The whole data has been uploaded to 2 mainstream online storage platform:

Download the data form one of the platform, unzip it and rename it to data, then place it into the project home directory, and you can run the projects successfully.

Feedback

If there are some problems or good suggestions about the project, you can email me by cutercorleytd@gmail.com or submit issues on this repo.