Pytorch lightning slow on colab

username: ANKUR_GUPTA1
cooked: <p>I tried using pytorch lightning using the available tutirials. But the execution is very slow and after some time colab becomes unresponsive. Can anyone help me with some solution regarding this.</p>

username: ptrblck
cooked: <p>Do you have an executable notebook on Colab?<br>
Also, are you seeing this slow execution only with Lightning or also with plain PyTorch code?</p>

username: ANKUR_GUPTA1
cooked: <p>I just used the official tutorial on MNIST classification.</p>
<aside class="onebox githubblob" data-onebox-src="https://github.com/Lightning-AI/pytorch-lightning/blob/master/README.md">
  <header class="source">

      <a href="https://github.com/Lightning-AI/pytorch-lightning/blob/master/README.md" target="_blank" rel="noopener nofollow ugc">github.com</a>
  </header>

  <article class="onebox-body">
    <h4><a href="https://github.com/Lightning-AI/pytorch-lightning/blob/master/README.md" target="_blank" rel="noopener nofollow ugc">Lightning-AI/pytorch-lightning/blob/master/README.md</a></h4>


      <pre><code class="lang-md">&lt;div align="center"&gt;

&lt;img alt="Lightning" src="https://pl-public-data.s3.amazonaws.com/assets_lightning/LightningColor.png" width="800px" style="max-width: 100%;"&gt;

&lt;br/&gt;
&lt;br/&gt;

**The deep learning framework to pretrain, finetune and deploy AI models.**

**NEW- Lightning 2.0 features a clean and stable API!!**

______________________________________________________________________

&lt;p align="center"&gt;
  &lt;a href="https://lightning.ai/"&gt;Lightning.ai&lt;/a&gt; •
  &lt;a href="https://lightning.ai/docs/pytorch/stable/"&gt;PyTorch Lightning&lt;/a&gt; •
  &lt;a href="https://lightning.ai/docs/fabric/stable/"&gt;Fabric&lt;/a&gt; •
  &lt;a href="https://lightning.ai/docs/app/stable/"&gt;Lightning Apps&lt;/a&gt; •
  &lt;a href="https://pytorch-lightning.readthedocs.io/en/stable/"&gt;Docs&lt;/a&gt; •
  &lt;a href="#community"&gt;Community&lt;/a&gt; •
</code></pre>



  This file has been truncated. <a href="https://github.com/Lightning-AI/pytorch-lightning/blob/master/README.md" target="_blank" rel="noopener nofollow ugc">show original</a>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>It is the one in demo<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/1/8/185cb02ebf2246fe9d2648bf369d0ee05785b75d.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/185cb02ebf2246fe9d2648bf369d0ee05785b75d" title="Screenshot_20200429-124813_Chrome"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/1/8/185cb02ebf2246fe9d2648bf369d0ee05785b75d_2_690x233.jpeg" alt="Screenshot_20200429-124813_Chrome" data-base62-sha1="3tw2ENzIqVc55494LunFGnEz1wh" width="690" height="233" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/1/8/185cb02ebf2246fe9d2648bf369d0ee05785b75d_2_690x233.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/1/8/185cb02ebf2246fe9d2648bf369d0ee05785b75d_2_1035x349.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/1/8/185cb02ebf2246fe9d2648bf369d0ee05785b75d_2_1380x466.jpeg 2x" data-dominant-color="F6F4F6"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot_20200429-124813_Chrome</span><span class="informations">1440×488 112 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>GPU is enabled</p>

username: ptrblck
cooked: <p>Have you compared the code to a plain PyTorch implementation or how did you verify that it’s “slow”?</p>

username: ANKUR_GUPTA1
cooked: <p>I have been training resnet20 on cifar10 in the same note book where I ran that particular code.<br>
It was running fine using normal pytorch.</p>

username: ptrblck
cooked: <p>Thanks for the information.<br>
CC <a class="mention" href="/u/williamfalcon">@williamFalcon</a></p>