Procedure
- Sign in to your KAGGLE Account Go to Kaggle → Sign in or Create your Kaggle account.
- Create a new notebook Click on the create (+) icon on the top-left corner of the page → Select “New Notebook” to open a new Kaggle Notebook Editor.
- Enable Internet and GPU Access
- →Verify your phone number (if already not verified).
- →Enter the verification code sent to your phone number.
- →Once verified, turn on the internet tab and enable GPU access.
- Select GPU Accelerator Click on the settings tab at the top of the notebook → Click on the Accelerator Option → Choose GPU-P100 from the given options.
- Since by default, the GPU is disabled. To enable it follow the given steps: Click on the sessions option on the bottom-right corner
Alternative Procedure
Accessing T4 GPU using Google colab.
- Open Google Colab Go to Google Colab → Sign in with your Google account → Create a new notebook or open an existing one.
- Enable GPU Acceleration In your Colab notebook, click on Runtime in the top menu → Select Change runtime type from the dropdown menu → A pop-up window will appear → Under Hardware accelerator → select GPU from the dropdown menu → Click Save.
- Verify GPU Availability
import tensorflow as tf
# Check if GPU is available
if tf.test.gpu_device_name():
print('GPU found:')
!nvidia-smi
else:
print('No GPU found. Check your settings.')This will display information about the GPU (e.g., Tesla T4, K80, etc.) if it is available.