def save(self, save_optimizer=False, save_path=None, **kwargs):
    "serialize models include optimizer and other info\n        return path where the model-file is stored.\n\n        Args:\n            save_optimizer (bool): whether save optimizer.state_dict().\n            save_path (string): where to save model, if it's None, save_path\n                is generate using time str and info from kwargs.\n        \n        Returns:\n            save_path(str): the path to save models.\n        "
    save_dict = dict()
    save_dict['model'] = self.faster_rcnn.state_dict()
    save_dict['config'] = opt._state_dict()
    save_dict['other_info'] = kwargs
    save_dict['vis_info'] = self.vis.state_dict()
    if save_optimizer:
        save_dict['optimizer'] = self.optimizer.state_dict()
    if (save_path is None):
        timestr = time.strftime('%m%d%H%M')
        save_path = ('checkpoints/fasterrcnn_%s' % timestr)
        for (k_, v_) in kwargs.items():
            save_path += ('_%s' % v_)
    save_dir = os.path.dirname(save_path)
    if (not os.path.exists(save_dir)):
        os.makedirs(save_dir)
    t.save(save_dict, save_path)
    self.vis.save([self.vis.env])
    return save_path
serialize models include optimizer and other info
return path where the model-file is stored.

Args:
    save_optimizer (bool): whether save optimizer.state_dict().
    save_path (string): where to save model, if it's None, save_path
        is generate using time str and info from kwargs.

Returns:
    save_path(str): the path to save models.
def save(self, save_optimizer=False, save_path=None, **kwargs):
    "serialize models include optimizer and other info\n        return path where the model-file is stored.\n\n        Args:\n            save_optimizer (bool): whether save optimizer.state_dict().\n            save_path (string): where to save model, if it's None, save_path\n                is generate using time str and info from kwargs.\n        \n        Returns:\n            save_path(str): the path to save models.\n        "
    save_dict = dict()
    save_dict['model'] = self.faster_rcnn.state_dict()
    save_dict['config'] = opt._state_dict()
    save_dict['other_info'] = kwargs
    save_dict['vis_info'] = self.vis.state_dict()
    if save_optimizer:
        save_dict['optimizer'] = self.optimizer.state_dict()
    if (save_path is None):
        timestr = time.strftime('%m%d%H%M')
        save_path = ('checkpoints/fasterrcnn_%s' % timestr)
        for (k_, v_) in kwargs.items():
            save_path += ('_%s' % v_)
    save_dir = os.path.dirname(save_path)
    if (not os.path.exists(save_dir)):
        os.makedirs(save_dir)
    t.save(save_dict, save_path)
    self.vis.save([self.vis.env])
    return save_path