Python utils.logging.SmoothedValue() Examples
The following are 14
code examples of utils.logging.SmoothedValue().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
utils.logging
, or try the search function
.
Example #1
Source File: training_stats.py From Detectron.pytorch with MIT License | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_metrics = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list) if cfg.FPN.FPN_ON: self.inner_loss_rpn_cls = [] self.inner_loss_rpn_bbox = [] self.inner_metrics = defaultdict(list)
Example #2
Source File: training_stats.py From FPN-Pytorch with MIT License | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_metrics = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list) if cfg.FPN.FPN_ON: self.inner_loss_rpn_cls = [] self.inner_loss_rpn_bbox = [] self.inner_metrics = defaultdict(list)
Example #3
Source File: training_stats.py From pcl.pytorch with MIT License | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list)
Example #4
Source File: training_stats.py From Detectron.pytorch with MIT License | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_metrics = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list) if cfg.FPN.FPN_ON: self.inner_loss_rpn_cls = [] self.inner_loss_rpn_bbox = [] self.inner_metrics = defaultdict(list)
Example #5
Source File: training_stats.py From Context-aware-ZSR with MIT License | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_metrics = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list) if cfg.FPN.FPN_ON: self.inner_loss_rpn_cls = [] self.inner_loss_rpn_bbox = [] self.inner_metrics = defaultdict(list)
Example #6
Source File: training_stats.py From PANet with MIT License | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_metrics = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list) if cfg.FPN.FPN_ON: self.inner_loss_rpn_cls = [] self.inner_loss_rpn_bbox = [] self.inner_metrics = defaultdict(list)
Example #7
Source File: training_stats.py From seg_every_thing with Apache License 2.0 | 6 votes |
def __init__(self, model): # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 # Output logging period in SGD iterations self.LOG_PERIOD = 20 self.smoothed_losses_and_metrics = { key: SmoothedValue(self.WIN_SZ) for key in model.losses + model.metrics } self.losses_and_metrics = { key: 0 for key in model.losses + model.metrics } self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) self.smoothed_mb_qsize = SmoothedValue(self.WIN_SZ) self.iter_total_loss = np.nan self.iter_timer = Timer() self.model = model
Example #8
Source File: training_stats.py From PMFNet with MIT License | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_metrics = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list) if cfg.FPN.FPN_ON: self.inner_loss_rpn_cls = [] self.inner_loss_rpn_bbox = [] self.inner_metrics = defaultdict(list)
Example #9
Source File: train_net.py From masktextspotter.caffe2 with Apache License 2.0 | 6 votes |
def __init__(self, model): # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 # Output logging period in SGD iterations self.LOG_PERIOD = 20 self.smoothed_losses_and_metrics = { key: SmoothedValue(self.WIN_SZ) for key in model.losses + model.metrics } self.losses_and_metrics = { key: 0 for key in model.losses + model.metrics } self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) self.smoothed_mb_qsize = SmoothedValue(self.WIN_SZ) self.iter_total_loss = np.nan self.iter_timer = Timer() self.model = model
Example #10
Source File: training_stats.py From Large-Scale-VRD.pytorch with MIT License | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_metrics = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list) if cfg.FPN.FPN_ON: self.inner_loss_rpn_cls = [] self.inner_loss_rpn_bbox = [] self.inner_metrics = defaultdict(list)
Example #11
Source File: training_stats.py From detectron-self-train with MIT License | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_metrics = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list) if cfg.FPN.FPN_ON: self.inner_loss_rpn_cls = [] self.inner_loss_rpn_bbox = [] self.inner_metrics = defaultdict(list)
Example #12
Source File: training_stats.py From DIoU-pytorch-detectron with GNU General Public License v3.0 | 6 votes |
def __init__(self, misc_args, log_period=20, tensorboard_logger=None): # Output logging period in SGD iterations self.misc_args = misc_args self.LOG_PERIOD = log_period self.tblogger = tensorboard_logger self.tb_ignored_keys = ['iter', 'eta'] self.iter_timer = Timer() # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 def create_smoothed_value(): return SmoothedValue(self.WIN_SZ) self.smoothed_losses = defaultdict(create_smoothed_value) self.smoothed_metrics = defaultdict(create_smoothed_value) self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) # For the support of args.iter_size self.inner_total_loss = [] self.inner_losses = defaultdict(list) if cfg.FPN.FPN_ON: self.inner_loss_rpn_cls = [] self.inner_loss_rpn_bbox = [] self.inner_metrics = defaultdict(list)
Example #13
Source File: training_stats.py From NucleiDetectron with Apache License 2.0 | 6 votes |
def __init__(self, model): # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 # Output logging period in SGD iterations self.LOG_PERIOD = 20 self.smoothed_losses_and_metrics = { key: SmoothedValue(self.WIN_SZ) for key in model.losses + model.metrics } self.losses_and_metrics = { key: 0 for key in model.losses + model.metrics } self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) self.smoothed_mb_qsize = SmoothedValue(self.WIN_SZ) self.iter_total_loss = np.nan self.iter_timer = Timer() self.model = model
Example #14
Source File: training_stats.py From DetectAndTrack with Apache License 2.0 | 6 votes |
def __init__(self, model): # Window size for smoothing tracked values (with median filtering) self.WIN_SZ = 20 # Output logging period in SGD iterations self.LOG_PERIOD = 20 self.smoothed_losses_and_metrics = { key: SmoothedValue(self.WIN_SZ) for key in model.losses + model.metrics } self.losses_and_metrics = { key: 0 for key in model.losses + model.metrics } self.smoothed_total_loss = SmoothedValue(self.WIN_SZ) self.smoothed_mb_qsize = SmoothedValue(self.WIN_SZ) self.iter_total_loss = np.nan self.iter_timer = Timer() self.model = model