I'm studying with this book How to make AI / machine learning / deep learning apps with Python
1-4 Google Colaboratory With Colaboratory provided by Google, you can start developing machine learning without installation. All you need is a web browser that supports HTML5!
No need to install Python environment, a set of frequently used libraries is already installed. Since the OS of the server is Ubuntu (Linux), any tools or libraries that run on Ubuntu can be freely installed and used. The mechanism is calculated by the Colaboratory server, and only the result is returned to the Web browser and displayed.
https://colab.research.google.com/
Open the notebook settings in Menu Runtime> Change Runtime Type Select and save the GPU as a hardware accelerator
You can see it by running the following command
Sat Jan 4 12:04:20 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.44 Driver Version: 418.67 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |
| N/A 37C P8 9W / 70W | 0MiB / 15079MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
Even Tesla T4! : grinning: I wanted to build an AI dedicated server, but I stopped. : blush:
--Maximum usage time is 12 hours --If the maximum usage time is exceeded, everything will be initialized and disappear.
Click Mount Drive from> to the left of Colaboratory to go to Google Drive It can be mounted under / content / drive / My Drive /. You can see the files you need as soon as you upload them to Google Drive. The file is saved properly even after 12 hours.
You can move directories with cd. By the way, you can also use commands such as ls ll.
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 10, 0.1)
y = np.sin(x)
plt.plot(x, y)
plt.show()