title: Not able to load a pickle file cloning from others repo due to "UnpicklingError: invalid load key."
body: <p>I try to load the pickle file from other people. I believe it is a neural network model created by <code>torch</code>. The variable is simply saved by <code>pickle.dump(variable, file, protocol=pickle.HIGHEST_PROTOCOL)</code>. However, I had a hard time to load it into my local machine. I don't want to retrain the model again since it's not efficient. Can anyone help me to load the pickle the file? I have tried to google it, but nothing of the solution can help me.</p>
  
  <p>I try to load a pickle file created by others. I clone it from the repo on GitLab. The code is simply like:</p>
  
  <pre class="lang-py prettyprint-override"><code>import pickle
  
  with open('pickle_from_repo.pickle', 'rb') as f:
    var = pickle.load(f)
  </code></pre>
  
  <p>and the error I got is:</p>
  
  <pre><code>UnpicklingError: invalid load key, 'v'.
  </code></pre>
  
  <p>I have checked the source code, the variable is stored into pickle by</p>
  
  <pre><code>def dump(self, path):
    with open(path, 'wb') as f:
      pickle.dump(self.classes_, f, protocol=pickle.HIGHEST_PROTOCOL)
  </code></pre>
  
  <p>Some people told me it might be <code>git lfs</code> problem, but I don't quite understand why this will be the problem.</p>