detrium.utils.logger

# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved https://github.com/facebookresearch/detr/blob/main/util/misc.py Mostly copy-paste from torchvision references.

class SmoothedValue(object)

Track a series of values and provide access to smoothed values over a window or the global series average.

名称类型默认值
window_size—20
fmt—None
class MetricLogger(object)
名称类型默认值
delimiter—'\t'
all_gather(data)

Run all_gather on arbitrary picklable data (not necessarily tensors) Args: data: any picklable object Returns: list[data]: list of data gathered from each rank

名称类型默认值
data——
reduce_dict(input_dict, average=True) -> Dict[str, torch.Tensor]

Args: input_dict (dict): all the values will be reduced average (bool): whether to do average or sum Reduce the values in the dictionary from all processes so that all processes have the averaged results. Returns a dict with the same fields as input_dict, after reduction.

名称类型默认值
input_dict——
average—True