wandb
wandb's full name is Weights & Biases, which is used to help us track machine learning projects. Through wandb, we can record the changes in indicators and the settings of super parameters during the model training process, and can also output the results. Conducting visual comparisons helps us better analyze the problems of the model during the training process. At the same time, we can also use it for team collaboration
wandb will upload the parameters during the training process to the server. Then log in to wandb to perform changes in parameters and indicators during the real-time process model training process
Features of wandb
- Save the changes in the model training process Hyperparameters
- Real-time visualization of changes in indicators during the training process
- Analyze changes in system indicators (CPU/GPU utilization) during the training process
- Collaborate with the team to develop
- Reproduce historical results
- Permanent retention of experimental records
- wandb can be easily integrated into various deep learning frameworks (Pytorch, Keras, Tensorflow, etc.)
Component modules of wandb
wandb main is composed of four major modules, which are:
- Dashboard: Tracking experimental analysis and visualization results
- Reports: Save and analyze reproducible experimental results
- Sweeps: Optimize the model by adjusting hyperparameters
- Artifacts: Dataset and model versioning, pipeline tracking
wandb account registration
pip install wandb
Copy after login
- Register wandb account Before using wandb, we need to register a free account
- Copy API keys Log in to wandb on the website, click Settings
Scroll down and find API Keys to copy
Embed wandb in torch
In this part we mainly introduce how to use wandb in torch. Here we take training MNIST as an example
wandb.login(key="填入你的API Keys")
Copy after login
- Define the training method
- Define the verification method
View the training results
- Log in to the wandb website to view the training results
- View the changes in Accuracy and loss of the model on the test set
##View the prediction effect of the model-
View the changes in system parameters (GPU and CPU, etc.) during the training process-
The above is the detailed content of Wandb is an indispensable machine learning analysis tool. For more information, please follow other related articles on the PHP Chinese website!