Skip to content

Examples pulled from https://keras.io/examples/ that I'm looking to either study further or apply to other projects.

Notifications You must be signed in to change notification settings

dmmagdal/Keras_Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keras_Examples

Source Index for all Keras Examples

https://keras.io/examples/

Abstractive Summarization Huggingface Transformers

Example Type: Natural Language Processing

Actor Critic Learning

Example Type: Reinforcement Learning

Audio Speech Recognition Transformer

Example Type: Audio Data

Note: Unable to verify/run on Docker due to issue with code. Code has only been able to be confirmed working on "bare metal" TF 2.7.0 environment.

Automatic Speech Recognition using CTC

Example Type: Audio Data

Classification Neural Decision Forests

Example Type: Structured Data

Compact Convolutional Transformer

Example Type: Computer Vision

Note: Unable to verify/run on Docker due to issue with code. Code has only been able to be confirmed working on "bare metal" TF 2.7.0 environment.

ConditionalGAN

Example Type: Generative Deep Learning

CycleGAN

Example Type: Generative Deep Learning

Note: Unable to verify/run due to issue with applying a function to dataset that requires multiple arguments.

DCGAN Generate Faces

Example Type: Generative Deep Learning

DeepDream

Example Type: Generative Deep Learning

Deep Deterministic Policy Gradient

Example Type: Reinforcement Learning

Denoising Diffusion Improved Model

Example Type: Generative Deep Learning

Denoising Diffusion Probabilistic Model

Example Type: Generative Deep Learning

Note: Unable to verify.run due to Out of Memory (OOM) issue (on Dell Desktop).

Few-shot Learning Reptile

Example Type: Computer Vision

GauGAN Conditional Image Generation

Example Type: Generative Deep Learning

Graph Attention Network Node Classification

Example Type: Graph Data

Graph Representation Learning Node2vec

Example Type: Graph Data

Image Captioning

Example Type: Computer Vision

Image Classification EfficientNet Finetunning

Example Type: Computer Vision

Note: This example is unfinished due to loss of interest. It has yet to be completed in such a way that it can be verified on Docker. May come back to this later.

Image Classification with Vision Transformer

Example Type: Computer Vision

Note: Unable to verify/run due to Out of Memory (OOM) issue on first epoch of training (on Dell Desktop).

Image generation with Stable Diffusion

Example Type: Generative Deep Learning

Note: Unable to verify/run due to environment. Example relies on access to Nvidia GPU through docker. Current steps to allow GPU access on Docker through WSL on Windows do not support Windows 10 (Windows 11 is required). For more information, see the following links: Docker Desktop WSL2 Nvidia CUDA on WSL Nvidia CUDA on WSL User Guide

Image Segmentation U-Net

Example Type: Computer Vision

Image Similarity Siamese Network

Example Type: Computer Vision

Image Super-Resolution with ESRGAN

Example Type: Computer Vision

Image Super-Resolution Efficient Sub-Pixel CNN

Example Type: Computer Vision

Imbalanced Classification

Example Type: Structured Data

Involution Neural Networks

Example Type: Computer Vision

Keras Tuner

Example Type: N/A

Knowledge Distillation

Example Type: Computer Vision

Large Scale Multi Label Classification

Example Type: Natural Language Processing

Lego Minifigure GAN

Example Type: Generative Deep Learning (Kaggle)

Masked Language Modeling BERT

Example Type: Natural Language Processing

MelGAN Spectrogram Inversion

Example Type: Audio Data

Note: Unable to verify/run due to issues with code. Tensorflow gives errors when training despite code being almost exact from example. Code from example page (linked notebook/github) also produces errors and fails as well.

Mobile Vision Transformers

Example Type: Computer Vision

Note: Unable to verify/run on Docker due to issue with code. Code has only been able to be confirmed working on "bare metal" TF 2.7.0 environment.

MultiModal Entailment

Example Type: Natural Language Processing

Natural Language Image Search Dual Encoder

Example Type: Natural Language Processing

Near Duplicate Image Search

Example Type: Computer Vision

Note: Unable to verify/run anywhere due to the use of TensorRT in the example (it optimizes the embedding module in the example but Windows on Dell Desktop does not support TensorRT or have TensorRT integration).

Neural Style Transfer

Example Type: Generative Deep Learning

Next Frame Prediction

Example Type: Computer Vision

Node Classification Graph Neural Networks

Example Type: Graph Data

Object Detection

Example Type: Computer Vision

PixelCNN

Example Type: Generative Deep Learning

Pretraining Transformer Keras NLP

Example Type: Natural Languate Processing

Note: Unable to verify/run due to Out of Memory (OOM) issue (on Dell Desktop).

Q Learning Atari Breakout

Example Type: Reinforcement Learning

Note: Unable to verify/run due to issues with OpenAI baselines module.

Question Answering with Hugging Face Transformers

Example Type: Natural Language Processing

Note: Unable to verify/run due to issues with code or OOM. Model would OOM when trying to train with GPU on 2060 SUPER (8GB) even when setting toggling mixed precision to "mixed_float16". When trying to train on CPU, loading the pretrained model would also error out.

Recommendation Transformer

Example Type: Structured Data

Note: Unable to verify/run due to issues with code. Tensorflow gives errors when training despite code being almost exact from example.

Recommending Movies Retrieval

Example Type: Structured Data

Semantic Similarity with BERT

Example Type: Natural Language Processing

Note: Unable to verify/run due to Out of Memory (OOM) issue (on Dell Desktop). Tensorflow OOM's on for finetuning (after initial training).

Text Classification with Switch Transformer

Example Type: Natural Language Processing

Text Classification with Transformer

Example Type: Natural Language Processing

Text Extraction BERT

Example Type: Natural Language Processing

Note: Unable to verify/run due to Out of Memory (OOM) issue (on Dell Desktop).

Text Generation FNet

Example Type: Natural Language Processing

Text Generation with KerasNLP

Example Type: Generative Deep Learning

Note: Unable to verify/run due to issues with code. KerasNLP library does not contain a specific method used in the example, at least that is with the official package that is downloaded with pip.

Text Generation Mini GPT

Example Type: Natural Language Processing

Timeseries Anomaly Detection with Autoencoder

Example Type: Timeseries

Traffic Forecasting with GNN LSTM

Example Type: Timeseries

Variational AutoEncoder

Example Type: Generative Deep Learning

Note: Unable to verify/run due to issues with code. Tensorflow gives errors when training despite code being almost exact from example.

Vector Quantized Variational AutoEncoder

Example Type: Generative

Note: Unable to verify/run on Docker due to issue with code. Code has only been able to be confirmed running (not working) on "bare metal" TF 2.7.0 environment. Original code seems to also yield the same errors on Google Colab as are being seen currently on "bare metal" environment. Issue is with code in Sampling Codebook section. May update later if example author addresses/updates source.

WGAN-GP

Example Type: Generative Deep Learning

Wide Deep Cross Networks

Example Type: Structured Data

Notes:

Dockerfiles for GPU usage (e.g. Dockerfile-gpu) to not appear to work at the moment on Windows systems (such as Dell Desktop and Lenovo Laptop) but are rather designed for work on Linux systems with GPUs enabled (presumably). For the Linux systems, it is presumed that the NVIDIA and Docker environments are already set up to match the Dockerfile.

Machines Dell Desktop and Lenovo Laptop have Tensorflow natively installed on them. However, Dell Desktop uses Tensorflow v2.4 and is equipped with a GPU while Lenovo Laptop has Tensorflow v2.4 and is a CPU only device.

Max Macbook M2 has Docker & Tensorflow v2.9 installed on it, but Tensorflow images on Docker do not work as they are compiled to a different instruction set than Apple Silicon. It is recommended that anything being run on that device is run on bare-metal.

On Windows machines (especially those running Windows 10 Home), Docker does not automatically release storage after removing/pruning containers on the hard drive. This is because the virtual hard disk for Docker does not release that memory back to the system for some reason on Windows. To reclaim that storage, do the following:

  1. Run "docker system prune" in the command line. This will remove the excess container and images not in use in the docker virtual hard disk.

  2. Then open a command line (Windows Terminal, Command Prompt, or Powershell) in admin mode.

  3. Run the command "wsl.exe --shutdown" command to shut down WSL2 on the machine. This will cause Docker to shutdown as well.

  4. Navigate to the the following path to locate the docker virtual hard disk.

Path: "C:\Users\comp_user\Appdata\Local\Docker\wsl\data"

The name of the file of the virtual hard disk usually looks like "ext4.vhdx".

  1. Issuing the command "optimize-vhd -Path C:\Users\comp_user\Appdata\Local\Docker\wsl\data\ext4.vhdx Mode -full" will shrink that virtual hard disk (only works with Windows Pro or Enterprise editions).

  2. On Windows 10 Home, run the following command to shrink the virtual hard disk:

CMD>diskpart

DISKPART>Select vdisk file="C:\Users\comp_user\AppData\Local\Docker\wsl\data\ext4.vhdx"

DISKPART>attach vdisk readonly

DISKPART>compact vdisk

DISKPART>detach vdisk

WARNING: This will remove all compiled images and containers in Docker. Make sure you do these steps if that is acceptable to you.

Source Index for Tensorflow Examples

https://www.tensorflow.org/tutorials

About

Examples pulled from https://keras.io/examples/ that I'm looking to either study further or apply to other projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published