title: IndexError: list index out of range in google colab
body: <p>Imported the need packages and models are below,</p>
  <pre><code>import tensorflow as tf
  from tensorflow import keras
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.layers import Activation, Dense
  from tensorflow.keras.optimizers import Adam
  from tensorflow.keras.metrics import categorical_crossentropy
  </code></pre>
  <p>In this section I just want to check GPU is perfectly working or not But I find an error to check and the checking code is,</p>
  <pre><code>physical_devices = tf.config.experimental.list_physical_devices('GPU')
  print(&quot;Num GPUs Available: &quot;, len(physical_devices))
  tf.config.experimental.set_memory_growth(physical_devices[0], True)
  </code></pre>
  <p>Below the error,</p>
  <pre><code>Num GPUs Available:  0
  ---------------------------------------------------------------------------
  IndexError                                Traceback (most recent call last)
  &lt;ipython-input-14-1fc9c14b9ae0&gt; in &lt;module&gt;()
        1 physical_devices = tf.config.experimental.list_physical_devices('GPU')
        2 print(&quot;Num GPUs Available: &quot;, len(physical_devices))
  ----&gt; 3 tf.config.experimental.set_memory_growth(physical_devices[0], True)
  
  IndexError: list index out of range
  </code></pre>
  <p>Need the help for sloving this issue or please help to install <code>GPU</code> in google colab.</p>