Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for Weights and Biases Metric, model checkpointing and evaluation logging.
Usage
I have added the functionality to
sr.py
,sample.py
andinfer.py
files. To enable logging to W&B pass-enable_wandb
.Super Resolution
Train:
python sr.py -p train -c config/sr_sr3_16_128.json -enable_wandb -log_wandb_ckpt
Training and validation metrics, generated sr image and model checkpoint are logged as shown.
Screen.Recording.2022-01-13.at.12.38.56.AM.mov
Evaluate:
python sr.py -p val -c config/sr_sr3_16_128.json -enable_wandb -log_eval
Below you can see the use of W&B Tables to log the result of evaluation.
Screen.Recording.2022-01-13.at.12.57.01.AM.mov
Unconditional Image Generation
Train:
python sample.py -p train -c config/sample_sr3_128.json -enable_wandb -log_wandb_ckpt
The resulting W&B run page will look similar to super-resolution one.
Evaluation:
python sample.py -p train -c config/sample_sr3_128.json -enable_wandb
Since the task is image generation, the generated images will be shown as a W&B image panel as shown.
Inference
To run inference
python infer.py -c config/sr_sr3_16_128.json -enable_wandb -log_infer
. This will give a table similar to evaluation but withoutpsnr
andssim
scores.Notes
-enable_wandb
is not passed, the scripts will run without any issue (normally).core/wandb_logger.py
file.-debug
argument. However, I have tested the implementation on full training.I would love to know what you think of this and hope this will add value to your useful repository.