mmpretrain.utils.load_json_log¶
- mmpretrain.utils.load_json_log(json_log)[源代码]¶
load and convert json_logs to log_dicts.
- 参数:
json_log (str) – The path of the json log file.
- 返回:
The result dict contains two items, “train” and “val”, for the training log and validate log.
- 返回类型:
示例
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}, ... ] }