title: Session crash for an unknown reason when using pickle.dump in Google Colab
body: <p>I am working on Google Colab environment to create a Siamese network using Keras. I have used this code from <a href="https://github.com/akshaysharma096/Siamese-Networks" rel="nofollow noreferrer">GitHub</a>. But I get an error when I tried to run the <code>pickle.dump</code> code:</p>
  
  <pre><code>with open(os.path.join(save_path,"train.pickle"), "wb") as f:
      pickle.dump((X,c), f)
  </code></pre>
  
  <p>The error : <code>OverflowError: cannot serialize a bytes object larger than 4 GiB</code></p>
  
  <p>So, I used Use pickle with protocol=4</p>
  
  <pre><code>pickle.dump((X,c), f, protocol=4)
  </code></pre>
  
  <p>but the session stopped during running this code and I got this message <code>"Session crash for an unknown reason "</code> and <code>Your session crashed after using all available RAM</code></p>
  
  <p>How can I solve this problem?</p>