These are simple examples that show how to use wandb to track experiments with different frameworks. They should be easy to use.
- Install wandb
pip install wandb
- Clone this repository
git clone https://github.com/wandb/examples
- Create a free account (optional)
Example deep learning projects that use wandb's features.
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
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.
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
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
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
Trains a fashion mnist classifier with a small CNN using the tensorflow framework.
cd examples/tf-cnn-fashion python train.py
Trains a fashion mnist classifier with a small CNN using the pytorch framework.
cd examples/pytorch-cnn-fashion python train.py
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
Trains a semantic segmentation on a dataset from the game "witness"
cd fastai/unet-segmentation pip install -r requirements.txt python train.py
Trains an SVM on the Iris dataset using scikit-learn
cd examples/scikit-iris python train.py
Trains a gradient boosted forest on the dermatology dataset
cd examples/xgboost-dermatology python train.py
Trains a perceptron on the Boston real estate dataset using numpy
cd examples/numpy-boston python train.py