class_docstr: Batch timing class.
  Use this class for tracking training and testing time/rate per batch or per sample.
  
  Keyword Arguments:
      rate {bool} -- Whether to report a rate (batches or samples per second) or a time (seconds
          per batch or sample). (default: {True})
      per_sample {bool} -- Whether to report times or rates per sample or per batch.
          (default: {True})
code: def __init__(self, rate=True, per_sample=True):
      self.start = time.time()
      self.end = None
      self.rate = rate
      self.per_sample = per_sample
  
file_path: facenet-pytorch/models/utils/training.py
imports: import torch
  import numpy
  import time
label_desc: Use image node_id 1 to create a new BatchTimer object from inherited base classes: object with example: obj = BatchTimer(rate, per_sample)