def load_variables(pickle_file_name):
  if os.path.exists(pickle_file_name):
    with open(pickle_file_name, 'rb') as f:
      d = cPickle.load(f)
    return d
  else:
    raise Exception('{:s} does not exists.'.format(pickle_file_name))
d = load_variables(pickle_file_name)
dataset/ETHPy150Open s-gupta/visual-concepts/sg_utils.py/load_variables