{
  "id": 138901,
  "title": "Your notebook tried to allocate more memory than available.",
  "url": "/competitions/deepfake-detection-challenge/discussion/138901",
  "author_name": "",
  "post_date": "2020-03-26T18:14:22.749634Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hello,</p>\n\n<p><code># y = np.asarray(y)[:,:,::-1]</code>\n<code>np.multiply(np.subtract(np.divide(y, 255.0), 1.0), 2.0)</code></p>\n\n<p>When I run this code block (part of preprocessing), I am observing that my RAM usage shoots up. Without this, even my 554 train samples (oversampling done) are easily preprocessed with very minimal RAM usage. But as I add the above code for normalization, that is divide, subtract, multiply, I don't understand why RAM usage is so high. Pls help if there's any other method.</p>\n\n<p>I also tried,\n<code>y = np.divide(y, 255.0)</code>\n<code>y = np.subtract(y, 1.0)</code>\n<code>y = np.multiply(y, 2.0)</code></p>\n\n<p>But no help.</p>",
  "messages": [
    {
      "id": "787350",
      "postDate": "03/26/2020 18:14:22",
      "content": "<p>Hello,</p>\n\n<p><code># y = np.asarray(y)[:,:,::-1]</code>\n<code>np.multiply(np.subtract(np.divide(y, 255.0), 1.0), 2.0)</code></p>\n\n<p>When I run this code block (part of preprocessing), I am observing that my RAM usage shoots up. Without this, even my 554 train samples (oversampling done) are easily preprocessed with very minimal RAM usage. But as I add the above code for normalization, that is divide, subtract, multiply, I don't understand why RAM usage is so high. Pls help if there's any other method.</p>\n\n<p>I also tried,\n<code>y = np.divide(y, 255.0)</code>\n<code>y = np.subtract(y, 1.0)</code>\n<code>y = np.multiply(y, 2.0)</code></p>\n\n<p>But no help.</p>",
      "rawMarkdown": "Hello,\n\n`# y = np.asarray(y)[:,:,::-1]`\n`np.multiply(np.subtract(np.divide(y, 255.0), 1.0), 2.0)`\n\nWhen I run this code block (part of preprocessing), I am observing that my RAM usage shoots up. Without this, even my 554 train samples (oversampling done) are easily preprocessed with very minimal RAM usage. But as I add the above code for normalization, that is divide, subtract, multiply, I don't understand why RAM usage is so high. Pls help if there's any other method.\n\nI also tried,\n`y = np.divide(y, 255.0)`\n`y = np.subtract(y, 1.0)`\n`y = np.multiply(y, 2.0)`\n\nBut no help.",
      "votes": null
    },
    {
      "id": "787827",
      "postDate": "03/27/2020 05:40:33",
      "content": "<p>You can try to create a swap file.</p>",
      "rawMarkdown": "You can try to create a swap file.",
      "votes": null
    },
    {
      "id": "829561",
      "postDate": "05/01/2020 22:43:58",
      "content": "<p>I tried to save without making \"run all\" and  I signed \" commit and save \" while ı am saving. It worked.</p>",
      "rawMarkdown": "I tried to save without making \"run all\" and  I signed \" commit and save \" while ı am saving. It worked.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 787827,
      "author_name": "liangsu",
      "author_url": "",
      "post_date": "03/27/2020 05:40:33",
      "content": "<p>You can try to create a swap file.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 829561,
      "author_name": "ftmozc",
      "author_url": "",
      "post_date": "05/01/2020 22:43:58",
      "content": "<p>I tried to save without making \"run all\" and  I signed \" commit and save \" while ı am saving. It worked.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "787350": "Hello,\n\n`# y = np.asarray(y)[:,:,::-1]`\n`np.multiply(np.subtract(np.divide(y, 255.0), 1.0), 2.0)`\n\nWhen I run this code block (part of preprocessing), I am observing that my RAM usage shoots up. Without this, even my 554 train samples (oversampling done) are easily preprocessed with very minimal RAM usage. But as I add the above code for normalization, that is divide, subtract, multiply, I don't understand why RAM usage is so high. Pls help if there's any other method.\n\nI also tried,\n`y = np.divide(y, 255.0)`\n`y = np.subtract(y, 1.0)`\n`y = np.multiply(y, 2.0)`\n\nBut no help.",
    "787827": "You can try to create a swap file.",
    "829561": "I tried to save without making \"run all\" and  I signed \" commit and save \" while ı am saving. It worked."
  },
  "source": "meta"
}