Giter Site home page Giter Site logo

examples's Introduction

Examples

These are simple examples that show how to use wandb to track experiments with different frameworks. They should be easy to use.

If you have any questions, please don't hesitate to ask in our Slack community.

Getting started

  1. Install wandb
pip install wandb
  1. Clone this repository
git clone https://github.com/wandb/examples
  1. Create a free account (optional)
wandb login

Example projects

Example deep learning projects that use wandb's features.

keras-cnn-fashion

Trains a fashion mnist classifier with a small CNN using the keras framework with the tensorflow backend. Uses a simple integration with WandbKerasCallback.

cd examples/keras-cnn-fashion
python train.py

keras-cnn-nature

train_small_cnn.py

Trains a small CNN on images of plants and animals using Keras. Highly configurable through command line flags: run with -h to see all the options. The data_tools directory contains a helper script to generate more manageable training datasets from the full 186GB iNaturalist 2017 dataset. A 12K subset of the data can be downloaded by clicking this link. For more context on this example, see this blog post and this W&B report, which explores various settings and hyperparameters.

cd examples/keras-cnn-nature
python train_small_cnn.py

finetune_experiments.py

Enables two kinds of finetuning experiments:

  • loading various pretrained base CNNs (Xception,ResNet, InceptionResNetV2, InceptionV3), pretraining for some epochs, freezing some of the layers of the resulting network, then continuing to finetune the rest of the layers
  • loading a small CNN, pretraining on general labels (in this case, predicting one of 5 biological classes) for a certain number of epochs, then finetuning on specific labels (predicting one of 25 biological species)

Highly configurable with commandline flags: run with -h to see all the options.

cd examples/keras-cnn-nature
python finetune_experiments.py

keras-gan-mnist

Trains a GAN on mnist data using a CNN in the keras framework with the tensorflow backend. This shows a more complicated integration with wandb using a custom callback on the generator model and the discriminator model.

cd examples/keras-gan-mnist
python train.py

tf-cnn-fashion

Trains a fashion mnist classifier with a small CNN using the tensorflow framework.

cd examples/tf-cnn-fashion
python train.py

pytorch-cnn-fashion

Trains a fashion mnist classifier with a small CNN using the pytorch framework.

cd examples/pytorch-cnn-fashion
python train.py

fastai-food101

Trains a 121 layer DenseNet on the Food-101 dataset using the 1cycle learning rate policy, mixed precision training, mixup data augmentation, and progressive resizing.

cd fastai/food-101
pip install -r requirements.txt
python train.py

fastai-unet-segmentation

Trains a semantic segmentation on a dataset from the game "witness"

cd fastai/unet-segmentation
pip install -r requirements.txt
python train.py

scikit-iris

Trains an SVM on the Iris dataset using scikit-learn

cd examples/scikit-iris
python train.py

xgboost-dermatology

Trains a gradient boosted forest on the dermatology dataset

cd examples/xgboost-dermatology
python train.py

numpy-boston

Trains a perceptron on the Boston real estate dataset using numpy

cd examples/numpy-boston
python train.py

examples's People

Contributors

lukas avatar raubitsj avatar cvphelps avatar vanpelt avatar lavanyashukla avatar staceysv avatar shawnlewis avatar gabesmed avatar adrianbg avatar iyaja avatar charlesfrye avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.