What I learned about AI / machine learning using Python (2)

Introduction

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!

Benefits of using Colaboratory

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.

Open Google Colaboratory

https://colab.research.google.com/

Assign GPU

Open the notebook settings in Menu Runtime> Change Runtime Type Select and save the GPU as a hardware accelerator

What kind of server is it?

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:

Constraint

--Maximum usage time is 12 hours --If the maximum usage time is exceeded, everything will be initialized and disappear.

Mount Google Drive

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.

Let's draw a graph for a moment

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()

コメント 2020-01-04 212935.png

Recommended Posts

What I learned about AI / machine learning using Python (1)
What I learned about AI / machine learning using Python (3)
What I learned about AI / machine learning using Python (2)
What I learned about AI and machine learning using Python (4)
What I learned about Linux
What I learned in Python
I learned about processes in Python
Build AI / machine learning environment with Python
[ML-Aents] I tried machine learning using Unity and Python TensorFlow (v0.11β compatible)
A story about simple machine learning using TensorFlow
[Python3] Let's analyze data using machine learning! (Regression)
I started machine learning with Python Data preprocessing
About machine learning overfitting
What is machine learning?
Memo for building a machine learning environment using Python
I tried to compress the image using machine learning
Machine learning learned with Pokemon
Python learning plan for AI learning
Machine learning with Python! Preparation
About machine learning mixed matrices
[Python] I tried using OpenPose
I implemented Extreme learning machine
Beginning with Python machine learning
I learned Python basic grammar
Build an environment for machine learning using Python on MacOSX
I started machine learning with Python Clustering & Dimension Compression & Visualization
Python beginners publish web applications using machine learning [Part 1] Introduction
What I learned by solving 30 questions of python Project Euler
I tried using Tensorboard, a visualization tool for machine learning
A note of what I learned when I thought about using pyenv or virtualenv on Windows
Machine learning A story about people who are not familiar with GBDT using GBDT in Python
Python Note: About comparison using is
[Python machine learning] Recommendation of using Spyder for beginners (as of August 2020)
What I stumbled upon using Airflow
I made a Line-bot using Python!
How about Anaconda for building a machine learning environment in Python?
I tried machine learning with liblinear
Machine learning with python (1) Overall classification
Machine learning summary by Python beginners
Notation I encountered while learning Python
[Python] What is @? (About the decorator)
What was surprising about Python classes
Perceptron learning experiment learned with Python
<For beginners> python library <For machine learning>
I tried using Thonny (Python / IDE)
Python: Preprocessing in Machine Learning: Overview
What I checked about Qiita's post
I tried reinforcement learning using PyBrain
I tried deep learning using Theano
Under investigation about PYNQ-Let's do deep learning with FPGA using Python-
"Scraping & machine learning with Python" Learning memo
[Note] AI / machine learning / python related websites [updated from time to time]
[Python] I tried using YOLO v3
Application development using Azure Machine Learning
What I learned in two months before the product was released as a machine learning fucking amateur
[Definitive Edition] Building an environment for learning "machine learning" using Python on Windows
What I read about VBA x Python fastest work technique Memo chapter3
[Definitive Edition] Building an environment for learning "machine learning" using Python on Mac
Vulkan compute with Python with VkInline and think about GPU machine learning and more
I tried to classify guitar chords in real time using machine learning
Source code of sound source separation (machine learning practice series) learned with Python