Many useful utility functions are in this file:

  
      github.com
  
  
    KaiyangZhou/deep-person-reid/blob/master/torchreid/utils/torchtools.py 3
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division

__all__ = ['save_checkpoint', 'load_checkpoint', 'resume_from_checkpoint',
           'open_all_layers', 'open_specified_layers', 'count_num_param',
           'load_pretrained_weights']

from collections import OrderedDict
import shutil
import warnings
import os
import os.path as osp
from functools import partial
import pickle

import torch
import torch.nn as nn

from .tools import mkdir_if_missing


  This file has been truncated. show original

  
  
    
    
  
  


Thanks to KaiyangZhou@github.