Skip to content

Repository files navigation

PyTorch-Implementations

PythonPyTorchJupyter

Introduction

PyTorch-Implementations features implementations of foundational deep learning architectures. Ranging from classical computer vision and sequence-to-sequence NLP models to fundamental generative AI models, this repository serves as a reference for understanding the mechanisms of these architectures. All models are implemented natively in PyTorch and trained on standard benchmarking datasets.


📁 File Structure

PyTorch-Implementations/
├── DCGAN/ # Deep Convolutional Generative Adversarial Network
│ ├── models/ # Saved model (pth)
│ ├── results/ # Training loss plot
│ └── dcgan.ipynb # Implementation and training notebook
├── DDPM/ # Denoising Diffusion Probabilistic Model
│ ├── models/ │ ├── results/ │ └── ddpm.ipynb ├── Transformer/ # Sequence-to-Sequence Transformer
│ ├── models/ │ ├── results/ │ └── transformer.ipynb ├── UNet/ # UNet for Segmentation
│ ├── models/ │ ├── results/ │ └── unet.ipynb ├── Variational-Autoencoder/ # Variational Autoencoder
│ ├── models/ │ ├── results/ │ └── vae.ipynb ├── Vision-Transformer/ # Vision Transformer for Classification
│ ├── models/ │ ├── results/ │ └── vit.ipynb ├── .gitignore ├── LICENSE # MIT License
└── README.md # Project Documentation

⚙️ Models & Datasets

DomainSpecific ArchitectureDatasetObjective
Generative AIDenoising Diffusion Probabilistic Model (DDPM)CelebAUnconditional Image Generation
Deep Convolutional GAN (DCGAN)CelebAAdversarial Image Generation
Variational Autoencoder (VAE)CelebALatent Space Reconstruction & Generation
Computer VisionVision Transformer (ViT)CIFAR-10Multi-class Image Classification
U-NetISBI 2016Biomedical Image Segmentation
Natural LanguageTransformer (Standard Seq2Seq)Multi30kEnglish to German Translation

🎥 Results Showcase

ArchitectureDatasetTaskDemonstration / Loss Curve
DDPMCelebAImage GenerationAlt Text
VAECelebALatent GenerationAlt Text
DCGANCelebAImage GenerationAlt Text
U-NetISBI 2016SegmentationAlt Text
Vision TransformerCIFAR-10ClassificationAlt Text
TransformerMulti30kTranslationAlt Text

🚀 Getting Started

Follow these steps to set up the environment and run any of the models locally.

1. Clone the repository and install dependencies:

Ensure you have Python 3.10+ installed. Install the required libraries, including PyTorch and Torchvision:

git clone [https://github.com/amimayo/PyTorch-Implementations.git](https://github.com/amimayo/PyTorch-Implementations.git)
cd PyTorch-Implementations
pip install torch torchvision numpy matplotlib jupyter

2. Navigate to the desired model:

Move into the directory of the specific architecture you want to explore.

cd DDPM

3. Launch the Jupyter Notebook:

Open the notebook to view the architecture code, training loop, and inference results.

jupyter notebook ddpm.ipynb

🛠️ To-Do List

  • [🟩] Core Architectures: Complete training and verification for UNet, Transformer, ViT, VAE, DCGAN, and DDPM.
  • [🟨] BERT (Bidirectional Encoder Representations from Transformers): Implement masked language modeling for sequence representation.
  • [🟨] GPT (Generative Pre-trained Transformer): Implement an autoregressive decoder-only architecture for text generation.

📜 License

Distributed under the MIT License.


About

Implementation of various foundational Deep Learning model architectures using PyTorch

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages