title: how to load a .pb vgg16 trained model
body: <p>I am trying to load a trained model for image beautification saved at local device through the code below:</p>
  
  <pre><code># load network
  network_pkl = misc.locate_network_pkl(args.results_dir)
  print('Loading network from "%s"...' % network_pkl)
  G, D, Gs = misc.load_network_pkl(args.results_dir, None)
  
  
  
  def load_network_pkl(run_id_or_result_subdir_or_network_pkl, snapshot=None):
      return load_pkl(locate_network_pkl(run_id_or_result_subdir_or_network_pkl, snapshot))
  
  
  def load_pkl(filename):
      with open(filename, 'rb') as file:
           return legacy.LegacyUnpickler(file, encoding='latin').load()
  
  def save_pkl(obj, filename):
      with open(filename, 'wb') as file:
          pickle.dump(obj, file, protocol=pickle.HIGHEST_PROTOCOL)
  </code></pre>
  
  <p>and I got this error as below:</p>
  
  <blockquote>
    <p>Initializing TensorFlow... Loading network from
    "C:\Users\wissa\Desktop\Out-source-projects/vgg_tf.pb"... Traceback
    (most recent call last):   File "beautify_image.py", line 46, in
    
        G, D, Gs = misc.load_network_pkl(args.results_dir, None)   File "C:\Users\wissa\Desktop\Out-source-projects\Beholder-GAN-master\misc.py",
    line 674, in load_network_pkl
        return load_pkl(locate_network_pkl(run_id_or_result_subdir_or_network_pkl,
    snapshot))   File
    "C:\Users\wissa\Desktop\Out-source-projects\Beholder-GAN-master\misc.py",
    line 436, in load_pkl
        return pickle.load(file)
    _pickle.UnpicklingError: invalid load key, ', ' '.</p>
  </blockquote>
  
  <p>could you please help me to fix it?</p>