-
Notifications
You must be signed in to change notification settings - Fork 2
Weights & Biases
Weights & Biases is an excellent tool to support training by running a series of alternate parameters on your models and logging the results. Wandb makes it easy to fine the best parameters and recall them to train your final model with.
The project page is at https://app.wandb.ai/mcdomx/cs109b_groupproject
Install and Setup:
pip install --upgrade wandb
wandb login <wandb token>
(visit project page and login)
Include WANDB in Training Script:
import wandb
from wandb.keras import WandbCallback
run = wandb.init(project="cs109b_groupproject")
run.<model parameter> = XX
(e.g. run.batch_size = 64
)
... model instantiation code ...
# Log metrics with wandb
model.fit(X_train, y_train, validationData=(X_test, y_test) epochs=config.epochs, callbacks=[WandbCallback()])
# Save model to wandb
model.save(os.path.join(wandb.run.dir, "model.h5"))
Execute training script as normal. Additional wandb logging entries will be displayed.