# C2 W2 lab is very slow and then self cancels unless I babysit it

**URL:** <https://community.deeplearning.ai/t/c2-w2-lab-is-very-slow-and-then-self-cancels-unless-i-babysit-it/288046>\
**Category:** Convolutional Neural Networks in TensorFlow\
**Tags:** week-module-2\
**Created:** [March 10, 2023, 8:31am UTC](https://community.deeplearning.ai/t/c2-w2-lab-is-very-slow-and-then-self-cancels-unless-i-babysit-it/288046 "2023-03-10T08:31:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![am003e](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@am003e](https://community.deeplearning.ai/u/am003e)\
**Post date:** [March 10, 2023, 8:31am UTC](https://community.deeplearning.ai/t/c2-w2-lab-is-very-slow-and-then-self-cancels-unless-i-babysit-it/288046/1 "2023-03-10T08:31:01Z")

</div>

When I run the training using a “reasonable” net (based on earlier labs and lectures), each epoch takes a few minutes and there are 15 epochs. This is fine, but when I stepped away from the computer it self canceled halfway through the training. How can I make it so that I don’t have to babysit Colab?

---

<div class="post-metadata">

**Author:** ![balaji.ambresh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/balaji.ambresh/32/128697_2.png) [@balaji.ambresh](https://community.deeplearning.ai/u/balaji.ambresh)\
**Post date:** [March 10, 2023, 3:27pm UTC](https://community.deeplearning.ai/t/c2-w2-lab-is-very-slow-and-then-self-cancels-unless-i-babysit-it/288046/2 "2023-03-10T15:27:15Z")

</div>

If you are not using GPU as the runtime environment, go to `Runtime > Change runtime type > Notebook settings` and set the `Hardware accelerator` to `GPU`.

Google colab offers [pro account](https://colab.research.google.com/signup) with a pay as you go option. If that option doesn’t work, you’ll have to rent a cloud instance or solve the problem on your personal desktop / laptop.

---

<div class="post-metadata">

**Author:** ![am003e](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@am003e](https://community.deeplearning.ai/u/am003e)\
**Post date:** [March 11, 2023, 8:13pm UTC](https://community.deeplearning.ai/t/c2-w2-lab-is-very-slow-and-then-self-cancels-unless-i-babysit-it/288046/3 "2023-03-11T20:13:16Z")

</div>

Thanks Balaji. I checked that it is using GPUs and it seems to be doing so by default. My question is twofold:

1. Is there a way to make it go faster? (Seems like the answer is “pay additional money”) and
2. Is there a way to make it so I don’t need to babysit it? This means moving my mouse around on the webpage so it knows I’m “there.” I failed to do this for just  
a bit too long on one training, and it quit after finishing 14.4 of 15 epochs which had taken 45 minutes already. This course is generally efficient and pro-education, so I perceive this UI behavior as running contrary to the spirit of the course.

---

<div class="post-metadata">

**Author:** ![balaji.ambresh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/balaji.ambresh/32/128697_2.png) [@balaji.ambresh](https://community.deeplearning.ai/u/balaji.ambresh)\
**Post date:** [March 12, 2023, 5:59pm UTC](https://community.deeplearning.ai/t/c2-w2-lab-is-very-slow-and-then-self-cancels-unless-i-babysit-it/288046/4 "2023-03-12T17:59:07Z")

</div>

1. All things remaining the same (i.e. python environment and network architecture), the paid plan is likely to speed things up. The reason I say likely is because I’m unsure if GPU allocation is random or if there’s a guaranteed speedup.
2. Try:  
a. NN with the same number of layers but with fewer parameters.  
b. I’ve heard of [Mouse Jiggler](https://www.amazon.com/Undetectable-Mover-Software-Automatically-Active/dp/B08GPGZ4Z6?th=1). Not sure if it’s the answer in keeping the colab session active.
