{
  "id": 437729,
  "title": "Predicting Brain Tumor from MRI-based Medical Image Synthesis using DCGAN and CNN",
  "url": "/competitions/tpu-getting-started/discussion/437729",
  "author_name": "Pratik Singh bharadwaj",
  "post_date": "2023-09-07T23:54:16.537000",
  "votes": 1,
  "comment_count": 1,
  "views": null,
  "content": "<p>Today i learned a new approach to a different problem after learning about TPU </p>\n<p>i was working on this project called \"Predicting Brain Tumor from MRI-based Medical Image Synthesis using DCGAN and CNN\" and i have system of 8 gigs of ram which was not sufficient to handle the kind of task i was trying to execute on my Jupyter notebook.</p>\n<p>while training its says,<br>\n              RuntimeError: [enforce fail at C:\\actions-runner_work\\pytorch\\pytorch\\builder\\windows\\pytorch\\c10\\core\\impl\\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 20132659200 bytes.</p>\n<p>i was using my ryzen 5 cpu </p>\n<h1>Determine the device</h1>\n<p>device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")</p>\n<h1>Move the model to the selected device</h1>\n<p>G.to(device)<br>\nD.to(device)</p>\n<p>which wasn't sufficient enough to handle the task so i tried to run it on different platforms like:- sas viya, and intel dev cloud but nothing seemed to work then i also tried to run the notebook on kaggle that also didn't work i also tried to tune the hyperparameters and set it to its lowest like batch size, no of epoches, training image size, learning rate etc but nothing worked for my system.</p>\n<p>but now i know kaggle has this TPU that can possible help me with this i am really excited to try this out  all thanks to kaggle in advance and that video on the competition page  aslo helped.</p>",
  "messages": [
    {
      "id": 2428495,
      "postDate": "2023-09-07T23:54:16.537Z",
      "content": "<p>Today i learned a new approach to a different problem after learning about TPU </p>\n<p>i was working on this project called \"Predicting Brain Tumor from MRI-based Medical Image Synthesis using DCGAN and CNN\" and i have system of 8 gigs of ram which was not sufficient to handle the kind of task i was trying to execute on my Jupyter notebook.</p>\n<p>while training its says,<br>\n              RuntimeError: [enforce fail at C:\\actions-runner_work\\pytorch\\pytorch\\builder\\windows\\pytorch\\c10\\core\\impl\\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 20132659200 bytes.</p>\n<p>i was using my ryzen 5 cpu </p>\n<h1>Determine the device</h1>\n<p>device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")</p>\n<h1>Move the model to the selected device</h1>\n<p>G.to(device)<br>\nD.to(device)</p>\n<p>which wasn't sufficient enough to handle the task so i tried to run it on different platforms like:- sas viya, and intel dev cloud but nothing seemed to work then i also tried to run the notebook on kaggle that also didn't work i also tried to tune the hyperparameters and set it to its lowest like batch size, no of epoches, training image size, learning rate etc but nothing worked for my system.</p>\n<p>but now i know kaggle has this TPU that can possible help me with this i am really excited to try this out  all thanks to kaggle in advance and that video on the competition page  aslo helped.</p>",
      "rawMarkdown": "Today i learned a new approach to a different problem after learning about TPU \n\ni was working on this project called \"Predicting Brain Tumor from MRI-based Medical Image Synthesis using DCGAN and CNN\" and i have system of 8 gigs of ram which was not sufficient to handle the kind of task i was trying to execute on my Jupyter notebook.\n\nwhile training its says,\n              RuntimeError: [enforce fail at C:\\actions-runner\\_work\\pytorch\\pytorch\\builder\\windows\\pytorch\\c10\\core\\impl\\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 20132659200 bytes.\n\n\ni was using my ryzen 5 cpu \n\n# Determine the device\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\n# Move the model to the selected device\nG.to(device)\nD.to(device)\n\nwhich wasn't sufficient enough to handle the task so i tried to run it on different platforms like:- sas viya, and intel dev cloud but nothing seemed to work then i also tried to run the notebook on kaggle that also didn't work i also tried to tune the hyperparameters and set it to its lowest like batch size, no of epoches, training image size, learning rate etc but nothing worked for my system.\n\nbut now i know kaggle has this TPU that can possible help me with this i am really excited to try this out  all thanks to kaggle in advance and that video on the competition page  aslo helped.",
      "votes": 1
    },
    {
      "id": 2501325,
      "postDate": "2023-10-27T11:25:23.480Z",
      "content": "<p>You might want to check <a href=\"https://www.kaggle.com/competitions/gan-getting-started\" target=\"_blank\">I’m Something of a Painter Myself</a> competition - it has some example of GAN being trained on TPU with Tensorflow.</p>",
      "rawMarkdown": "You might want to check [I’m Something of a Painter Myself](https://www.kaggle.com/competitions/gan-getting-started) competition - it has some example of GAN being trained on TPU with Tensorflow."
    }
  ],
  "comments": [
    {
      "id": 2501325,
      "author_name": "Araik Tamazian",
      "author_url": "",
      "post_date": "2023-10-27T11:25:23.480000",
      "content": "<p>You might want to check <a href=\"https://www.kaggle.com/competitions/gan-getting-started\" target=\"_blank\">I’m Something of a Painter Myself</a> competition - it has some example of GAN being trained on TPU with Tensorflow.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2428495": "Today i learned a new approach to a different problem after learning about TPU \n\ni was working on this project called \"Predicting Brain Tumor from MRI-based Medical Image Synthesis using DCGAN and CNN\" and i have system of 8 gigs of ram which was not sufficient to handle the kind of task i was trying to execute on my Jupyter notebook.\n\nwhile training its says,\n              RuntimeError: [enforce fail at C:\\actions-runner\\_work\\pytorch\\pytorch\\builder\\windows\\pytorch\\c10\\core\\impl\\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 20132659200 bytes.\n\n\ni was using my ryzen 5 cpu \n\n# Determine the device\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\n# Move the model to the selected device\nG.to(device)\nD.to(device)\n\nwhich wasn't sufficient enough to handle the task so i tried to run it on different platforms like:- sas viya, and intel dev cloud but nothing seemed to work then i also tried to run the notebook on kaggle that also didn't work i also tried to tune the hyperparameters and set it to its lowest like batch size, no of epoches, training image size, learning rate etc but nothing worked for my system.\n\nbut now i know kaggle has this TPU that can possible help me with this i am really excited to try this out  all thanks to kaggle in advance and that video on the competition page  aslo helped.",
    "2501325": "You might want to check [I’m Something of a Painter Myself](https://www.kaggle.com/competitions/gan-getting-started) competition - it has some example of GAN being trained on TPU with Tensorflow."
  }
}