Keras documentation, hosted live at keras.io

Related tags

Deep Learningkeras-io
Overview

Keras.io documentation generator

This repository hosts the code used to generate the keras.io website.

Generating a local copy of the website

pip install -r requirements.txt
cd scripts
python autogen.py make
python autogen.py serve

If you have Docker (you don't need the gpu version of Docker), you can run instead:

docker build -t keras-io . && docker run --rm -p 8000:8000 keras-io

It will take a while the first time because it's going to pull the image and the dependencies, but on the next times it'll be much faster.

Another way of testing using Docker is via our Makefile:

make container-test

This command will build a Docker image with a documentation server and run it.

Call for examples

Are you interested in submitting new examples for publication on keras.io? We welcome your contributions! Please read the information below about adding new code examples.

We are currently interested in the following examples.

Adding a new code example

Keras code examples are implemented as tutobooks.

A tutobook is a script available simultaneously as a notebook, as a Python file, and as a nicely-rendered webpage.

Its source-of-truth (for manual edition and version control) is its Python script form, but you can also create one by starting from a notebook and converting it with the command nb2py.

Text cells are stored in markdown-formatted comment blocks. the first line (starting with """) may optionally contain a special annotation, one of:

  • shell: execute this block while prefixing each line with !.
  • invisible: do not render this block.

The script form should start with a header with the following fields:

Title: (title)
Author: (could be `Authors`: as well, and may contain markdown links)
Date created: (date in yyyy/mm/dd format)
Last modified: (date in yyyy/mm/dd format)
Description: (one-line text description)

To see examples of tutobooks, you can check out any .py file in examples/ or guides/.

Creating a new example starting from a ipynb file

  1. Save the ipynb file to local disk.
  2. Convert the file to a tutobook by running: (assuming you are in the scripts/ directory)
python tutobooks.py nb2py path_to_your_nb.ipynb ../examples/vision/script_name.py

This will create the file examples/vision/script_name.py.

  1. Open it, fill in the headers, and generally edit it so that it looks nice.

NOTE THAT THE CONVERSION SCRIPT MAY MAKE MISTAKES IN ITS ATTEMPTS TO SHORTEN LINES. MAKE SURE TO PROOFREAD THE GENERATED .py IN FULL. Or alternatively, make sure to keep your lines reasonably-sized (<90 char) to start with, so that the script won't have to shorten them.

  1. Run python autogen.py add_example vision/script_name. This will generate an ipynb and markdown rendering of your example, creating files in examples/vision/ipynb, examples/vision/md, and examples/vision/img. Do not modify any of these files by hand; only the original Python script should ever be edited manually.
  2. Submit a PR adding examples/vision/script_name.py (only the .py, not the generated files). Get a review and approval.
  3. Once the PR is approved, add to the PR the files created by the add_example command. Then we will merge the PR.

Creating a new example starting from a Python script

  1. Format the script with black: black script_name.py
  2. Add tutobook header
  3. Put the script in the relevant subfolder of examples/ (e.g. examples/vision/script_name)
  4. Run python autogen.py add_example vision/script_name. This will generate an ipynb and markdown rendering of your example, creating files in examples/vision/ipynb, examples/vision/md, and examples/vision/img. Do not modify any of these files by hand; only the original Python script should ever be edited manually.
  5. Submit a PR adding examples/vision/script_name.py (only the .py, not the generated files). Get a review and approval.
  6. Once the PR is approved, add to the PR the files created by the add_example command. Then we will merge the PR.

Previewing a new example

You can locally preview what the example looks like by running:

cd scripts
python autogen.py add_example vision/script_name

(Assuming the tutobook file is examples/vision/script_name.py.)

NOTE THAT THIS COMMAND WILL ERROR OUT IF ANY CELLS TAKES TOO LONG TO EXECUTE. In that case, make your code lighter/faster. Remember that examples are meant to demonstrate workflows, not train state-of-the-art models. They should stay very lightweight.

Then serving the website:

python autogen.py make
python autogen.py serve

And navigating to 0.0.0.0:8000/examples.

Read-only autogenerated files

The contents of the following folders should not be modified by hand:

  • site/*
  • sources/*
  • templates/examples/*
  • templates/guides/*
  • examples/*/md/*, examples/*/ipynb/*, examples/*/img/*
  • guides/md/*, guides/ipynb/*, guides/img/*

Modifiable files

These are the only files that should be edited by hand:

  • templates/*.md, with the exception of templates/examples/* and templates/guides/*
  • examples/*/*.py
  • guides/*.py
  • theme/*
  • scripts/*.py
Owner
Keras
Deep Learning for humans
Keras
Official implementation of "Refiner: Refining Self-attention for Vision Transformers".

RefinerViT This repo is the official implementation of "Refiner: Refining Self-attention for Vision Transformers". The repo is build on top of timm an

101 Dec 29, 2022
A booklet on machine learning systems design with exercises

Machine Learning Systems Design Read this booklet here. This booklet covers four main steps of designing a machine learning system: Project setup Data

Chip Huyen 7.6k Jan 08, 2023
PyTorch implementation for the Neuro-Symbolic Sudoku Solver leveraging the power of Neural Logic Machines (NLM)

Neuro-Symbolic Sudoku Solver PyTorch implementation for the Neuro-Symbolic Sudoku Solver leveraging the power of Neural Logic Machines (NLM). Please n

Ashutosh Hathidara 60 Dec 10, 2022
Machine-in-the-Loop Rewriting for Creative Image Captioning

Machine-in-the-Loop Rewriting for Creative Image Captioning Data Annotated sources of data used in the paper: Data Source URL Mohammed et al. Link Gor

Vishakh P 6 Jul 24, 2022
kullanışlı ve işinizi kolaylaştıracak bir araç

Hey merhaba! işte çok sorulan sorularının cevabı ve sorunlarının çözümü; Soru= İçinde var denilen birçok şeyi göremiyorum bunun sebebi nedir? Cevap= B

Sexettin 16 Dec 17, 2022
Tutorial in Python targeted at Epidemiologists. Will discuss the basics of analysis in Python 3

Python-for-Epidemiologists This repository is an introduction to epidemiology analyses in Python. Additionally, the tutorials for my library zEpid are

Paul Zivich 120 Nov 17, 2022
Github project for Attention-guided Temporal Coherent Video Object Matting.

Attention-guided Temporal Coherent Video Object Matting This is the Github project for our paper Attention-guided Temporal Coherent Video Object Matti

71 Dec 19, 2022
A Deep learning based streamlit web app which can tell with which bollywood celebrity your face resembles.

Project Name: Which Bollywood Celebrity You look like A Deep learning based streamlit web app which can tell with which bollywood celebrity your face

BAPPY AHMED 20 Dec 28, 2021
Pytorch for Segmentation

Pytorch for Semantic Segmentation This repo has been deprecated currently and I will not maintain it. Meanwhile, I strongly recommend you can refer to

ycszen 411 Nov 22, 2022
High-Resolution Image Synthesis with Latent Diffusion Models

Latent Diffusion Models arXiv | BibTeX High-Resolution Image Synthesis with Latent Diffusion Models Robin Rombach*, Andreas Blattmann*, Dominik Lorenz

CompVis Heidelberg 5.6k Dec 30, 2022
Code for ICCV2021 paper SPEC: Seeing People in the Wild with an Estimated Camera

SPEC: Seeing People in the Wild with an Estimated Camera [ICCV 2021] SPEC: Seeing People in the Wild with an Estimated Camera, Muhammed Kocabas, Chun-

Muhammed Kocabas 187 Dec 26, 2022
Exploring Simple 3D Multi-Object Tracking for Autonomous Driving (ICCV 2021)

Exploring Simple 3D Multi-Object Tracking for Autonomous Driving Chenxu Luo, Xiaodong Yang, Alan Yuille Exploring Simple 3D Multi-Object Tracking for

QCraft 141 Nov 21, 2022
A pure PyTorch implementation of the loss described in "Online Segment to Segment Neural Transduction"

ssnt-loss ℹ️ This is a WIP project. the implementation is still being tested. A pure PyTorch implementation of the loss described in "Online Segment t

張致強 1 Feb 09, 2022
EfficientMPC - Efficient Model Predictive Control Implementation

efficientMPC Efficient Model Predictive Control Implementation The original algo

Vin 8 Dec 04, 2022
ECCV2020 paper: Fashion Captioning: Towards Generating Accurate Descriptions with Semantic Rewards. Code and Data.

This repo contains some of the codes for the following paper Fashion Captioning: Towards Generating Accurate Descriptions with Semantic Rewards. Code

Xuewen Yang 56 Dec 08, 2022
POT : Python Optimal Transport

POT: Python Optimal Transport This open source Python library provide several solvers for optimization problems related to Optimal Transport for signa

Python Optimal Transport 1.7k Dec 31, 2022
Head and Neck Tumour Segmentation and Prediction of Patient Survival Project

Head-and-Neck-Tumour-Segmentation-and-Prediction-of-Patient-Survival Welcome to the Head and Neck Tumour Segmentation and Prediction of Patient Surviv

5 Oct 20, 2022
Demo for Real-time RGBD-based Extended Body Pose Estimation paper

Real-time RGBD-based Extended Body Pose Estimation This repository is a real-time demo for our paper that was published at WACV 2021 conference The ou

Renat Bashirov 118 Dec 26, 2022
Reinforcement Learning for the Blackjack

Reinforcement Learning for Blackjack Author: ZHA Mengyue Math Department of HKUST Problem Statement We study playing Blackjack by reinforcement learni

Dolores 3 Jan 24, 2022
交互式标注软件,暂定名 iann

iann 交互式标注软件,暂定名iann。 安装 按照官网介绍安装paddle。 安装其他依赖 pip install -r requirements.txt 运行 git clone https://github.com/PaddleCV-SIG/iann/ cd iann python iann

294 Dec 30, 2022