google-research / growneuron

Apache License 2.0
51 stars 8 forks source link

GradMax: Growing Neural Networks using Gradient Information

Open In Colab

Code for reproducing our results in the GradMax paper [arxiv.org/abs/2201.05125].

GradMax

Setup

First clone this repo.

git clone https://github.com/google-research/growneuron.git
cd growneuron

Following script installs the necessary libraries and runs few tests.

bash run.sh

Following will download the data and run the baseline experiment. If the data is already downloaded use the --data_dir flag to pass the path.

python growneuron/cifar/main.py --output_dir=/tmp/cifar --download_data

Running GradMax

Following command would start a training with WRN-28-0.25x and grow it into WRN-28-1. Growth is done every 2500 step starting from iteration 10000 at all convolutional layers at once.

rm -rf /tmp/cifar
python growneuron/cifar/main.py --output_dir=/tmp/cifar \
--config=growneuron/cifar/configs/grow_all_at_once.py \
--config.grow_type=add_gradmax

Other Experiments

Disclaimer

This is not an officially supported Google product.