Beyond Artifitial Intelligence modelZoo and boilerplatE (BAIZE) is designed for helping researchers to quickly build a deep-learning-based project.
Organizing your code with BAIZE makes your code:
- Keep architecture consistent by providing both framework and boilerplate
- More readable by decoupling the research code from the engineering
- Keep all the flexibility in framework, which removes a ton of boilerplate; and keep enough details in boilerplate, which give more space for engineers
- Easier to reproduce and have enough details
- Less error-prone by automating most of the training and evaluation, including model persistence and progress monitoring
- Combined with lots of deep learning tools, such as nni, for easier and faster tuning
- Provide many popular reusable modules
Install from pypi:
pip install PyBaize
Baize mainly includes four parts:
- basic project toolkits, like logging
- data process
- deep learning framework:
- torch
- mxnet
- deep learning boilerplate:
- torch
- mxnet
- model zoo
Using BAIZE light module, we will be able to train and evaluate a network in 5 minutes with friendly log information to both screen and local file.
Before we use the light module, we need to
- prepare the training dataset
- define network
- define the parameters we are going to use in a configuration, such as the model_dir to store the training log and the hyper parameters of network.
- define how the model will be trained including:
- the loss function
- the fit procedure.
- the trainer (trainer in mxnet, optim in pytorch)
- we can additionally specify
- initialization method
- the evaluation including the data iterator and evaluation procedure
- hyper parameters searching with nni
- log to tensorboard
- command line interface
For convenience, we call the five stages mentioned above as:
- data preparation
- network definition
- configuration
- training
- additional