0% found this document useful (0 votes)
46 views

Jupyterlab: Clearing Gpu Memory

This document provides an overview of the JupyterLab environment used for the hands-on lab. It describes the key components of the JupyterLab interface including the menu bar, file browser, tabs for open files, and code/content cells. It also explains how to execute code cells and introduces the concept of clearing GPU memory, listing three primary ways to do so including using buttons in the menu or kernel menu, or via a code cell. The document directs the user to the next notebook to perform image classification on handwritten digits as an introduction to deep learning.

Uploaded by

Praveen Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Jupyterlab: Clearing Gpu Memory

This document provides an overview of the JupyterLab environment used for the hands-on lab. It describes the key components of the JupyterLab interface including the menu bar, file browser, tabs for open files, and code/content cells. It also explains how to execute code cells and introduces the concept of clearing GPU memory, listing three primary ways to do so including using buttons in the menu or kernel menu, or via a code cell. The document directs the user to the next notebook to perform image classification on handwritten digits as an introduction to deep learning.

Uploaded by

Praveen Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

00_jupyterlab about:srcdoc

Header
(https://www.nvidia.com/dli)

JupyterLab
For this hands-on lab, we use JupyterLab (https://jupyterlab.readthedocs.io/en/stable/) to manage our
environment. The JupyterLab Interface (https://jupyterlab.readthedocs.io/en/stable/user/interface.html) is a
dashboard that provides access to interactive iPython notebooks, as well as the folder structure of our
environment and a terminal window into the Ubuntu operating system. The first view you'll see includes a
menu bar at the top, a file browser in the left sidebar, and a main work area that is initially open to the
"Launcher" page.

The file browser can be navigated just like any other file explorer. A double click on any of the items will open
a new tab with its content.

The main work area includes tabbed views of open files that can be closed, moved, and edited as needed.

The notebooks, including this one, consist of a series of content and code cells. To execute code in a code
cell, press Shift+Enter or the "Run" button in the menu bar above, while a cell is highlighted. Sometimes,
a content cell will get switched to editing mode. Pressing Shift+Enter will switch it back to a readable
form.

Try executing the simple print statement in the cell below.

In [1]: # Highlight this cell and click [Shift+Enter] to execute


print('This is just a simple print statement')

This is just a simple print statement

Clearing GPU Memory

At times you will need to clear the GPUs memory, either to reset the GPU state when an experiment goes
wrong, or, in between notebooks when you need a fresh start for a new set of exercises.

There are 3 primary ways to clear the GPU memory. The first is to use the ⟳ button on the menu directly
above the notebook. Click it now, you should see a prompt asking if it is okay to reset the GPU memory.

The second way is via a code cell that we will be providing for you at the end of each notebook. Below is one
of these cells which you can run just to get into the right habit.

1 of 2 12/07/2021, 04:56 pm
00_jupyterlab about:srcdoc

In [2]: import IPython


app = IPython.Application.instance()
app.kernel.do_shutdown(True)

Out[2]: {'status': 'ok', 'restart': True}

The final way is with the kernel menu on the left, the dark circle with a light square in it. While the previous
two strategies might be considered a "soft" reset, this is more of a force "hard" stop.

Next

Now that you are familiar with the interactive environment, you will, in the next section, perform the "hello
world" of deep learning, training a neural network to perform image classification on handwritten digits. Please
continue to 01_mnsist.ipynb (./01_mnist.ipynb).

Header
(https://www.nvidia.com/dli)

2 of 2 12/07/2021, 04:56 pm

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy