mmpretrain.utils.load_json_log¶
- mmpretrain.utils.load_json_log(json_log)[source]¶
load and convert json_logs to log_dicts.
- Parameters:
json_log (str) – The path of the json log file.
- Returns:
The result dict contains two items, “train” and “val”, for the training log and validate log.
- Return type:
Example
An example output:
{ 'train': [ {"lr": 0.1, "time": 0.02, "epoch": 1, "step": 100}, {"lr": 0.1, "time": 0.02, "epoch": 1, "step": 200}, {"lr": 0.1, "time": 0.02, "epoch": 1, "step": 300}, ... ] 'val': [ {"accuracy/top1": 32.1, "step": 1}, {"accuracy/top1": 50.2, "step": 2}, {"accuracy/top1": 60.3, "step": 2}, ... ] }