R squred score for neural network model comparision

Sneha_Verma: <p>hello,<br>
i am trying to create a neural network with geometric data as output and i have unrolled them into a vector i would like to share you my file through jovian. i have few doubts .<br>
i am training the data but the training loss does not go below 80. can you please tell me what i am doing wrong?<br>
the main idea is to create a nn with variable hidden layer and pruning value alpha</p>
<p>One is i am using R square score as metric and i am getting a very bad r square score how can i improve it.</p>
<p>how do i overfit the model i have just 441 samples, all of which are of size 2043x3 as output and just 2x1 input</p>
<p>also i am getting issue when i change the hidden layer to 8 or 10 as<br>
"<br>
CUDA out of memory. Tried to allocate 76.00 MiB (GPU 0; 4.00 GiB total capacity; 1.85 GiB already allocated; 37.20 MiB free; 1.88 GiB reserved in total by PyTorch)<br>
"<br>
i have used torch.cuda.empty_cache()<br>
but it still doesnt work</p>
<p>also my next goal is to optimise this whole code to me used in cuda<br>
can you please help me</p>
<aside class="onebox allowlistedgeneric">
  <header class="source">
      <img src="https://jovian.ai/jovian_favicon.png" class="site-icon" width="66" height="66">
      <a href="https://jovian.ai/snoozeyouloose/task-3-new-c0fb8" target="_blank" rel="noopener nofollow ugc">jovian.ai</a>
  </header>
  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/361;"><img src="https://jovian.ai/api/gist/c0fb8da79d324447820c69c13581e31c/preview/21a6fea9b7e645198583a3e8a25c0f83?size=l" class="thumbnail" width="690" height="361"></div>

<h3><a href="https://jovian.ai/snoozeyouloose/task-3-new-c0fb8" target="_blank" rel="noopener nofollow ugc">snoozeyouloose/task-3-new-c0fb8 - Jovian</a></h3>

<p>Collaborate with snoozeyouloose on task-3-new-c0fb8 notebook.</p>


  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>


ptrblck: <aside class="quote no-group" data-username="Sneha_Verma" data-post="1" data-topic="105065">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/sneha_verma/48/31214_2.png" class="avatar"> Sneha_Verma:</div>
<blockquote>
<p>i am training the data but the training loss does not go below 80. can you please tell me what i am doing wrong?</p>
</blockquote>
</aside>
<p>You could try to overfit a really small dataset first by playing around with hyperparameters and make sure your model is able to do so.</p>
<aside class="quote no-group quote-modified" data-username="Sneha_Verma" data-post="1" data-topic="105065">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/sneha_verma/48/31214_2.png" class="avatar"> Sneha_Verma:</div>
<blockquote>
<p>also i am getting issue when i change the hidden layer to 8 or 10 as<br>
[…]<br>
i have used torch.cuda.empty_cache()</p>
</blockquote>
</aside>
<p><code>torch.cuda.empty_cache()</code> won’t help in this case besides slowing down your code.<br>
Your GPU doesn’t have enough memory for 10 layers, so you could either lower the batch size or use <code>torch.utils.checkpoint</code> to trade compute for memory.</p>

Sneha_Verma: <p>thank you it helped . there was random points in the data set. as soon as i tried to print and see the data set i found the issue and my r square was around 0.9 and above after that</p>