First of all, there is a bonus at the end! You get the point

Have you ever had the experience:

  • Want to build your own neural network, but don’t know which tool to use?

  • Want to configure the deep learning framework TensorFlow, but get stuck with complex configuration steps?

  • Want to use GPU for accelerated training, but have limited budget to achieve high configuration?

  • · · · · · ·

Imagine if there were a free online cloud platform that could be used without installing TensorFlow and that could be used for GPU-accelerated training. You heard me right, this kind of thing does exist! Today, Red Rock is giving you a good look at Colaboratory, a free cloud tool from Google.

Let’s start with an introduction to Colaboratory:

Colaboratory is a Google research program designed to help spread machine learning training and research. It is a Jupyter laptop environment that requires no setup to use and runs entirely in the cloud. Colaboratory notebooks are stored on Google’s CLOUD Drive and can be shared just as you would with Google Docs or spreadsheets. Colaboratory is free to use.

In other words, Colaboratory is stored on Google’S CLOUD Drive, so we can write Jupyter Notebook directly on Google’s Cloud Drive, use the deep learning framework TensorFlow online, and train our neural networks. Cool!

1. Google Cloud Drive

First, open Google and log in to your Google account using email (if you don’t have an account, just sign up using email).

Once you have logged in to your Google account, you can access the cloud drive from the Google app in the upper right corner of the page.

Google drive is a real conscience, everyone gets 15 gb of free space to use. You can upgrade if you don’t have enough space, but red Stone thinks 15 GB is enough.

2. The associated Colaboratory

After entering the Google Cloud Drive, you need to associate Colaboratory. Go to My Hard drive -> More -> Associate more apps. I have associated with Colaboratory.

Then, search and find Colaboratory, and associate.

Of course, another association method is to create new folders and associate Colaboratory with individual folders. However, each new folder needs to be re-associated, which is more troublesome. Directly to the cloud drive association can achieve once and for all!

This way, Google CGB is associated with Colaboratory, and we can use Colaboratory. Easy, right?

3. Create the Colaboratory notebook

After Colaboratory is associated, create a folder (for example, APP).

Then go to the APP folder and right-click more -> Colaboratory to create the Jupyter Notebook.

Rename the file by clicking on the file name, for example, to test.ipynb.

4. Use Colaboratory (emphasis)

The first step is configuring Colaboratory, which is very important and very powerful. Go to Modify -> Laptop Settings.

In the laptop setup, we can choose to use Python 2 or Python 3. More importantly, you can choose to use GPU hardware acceleration. Click Save after setting.

Then we can write our code and comment documents in the Jupyter Notebook. Colaboratory is itself a data analysis tool that combines text, code, and code output into a collaborative document. For the Jupyter Notebook syntax is not clear, check out the following tutorial:

Introduction to Jupyter Notebook

Introduction to Jupyter Notebook

The following highlights how to run TensorFlow code using Colaoratory. The following example shows the addition of two matrices.

Enter the following code directly into the Jupyter Notebook code cell:

import tensorflow as tf import numpy as np with tf.Session(): Input1 = tf.constant(1.0, Shape =[2, 3]) InpuT2 = tf.0 3))) output = tf.add(input1, input2) result = output.eval() resultCopy the code

Shift + Enter to print:

array([[2., 3., 4.], [5., 6., 7.]], dtype=float32)

Colaboratory already includes a number of widely used libraries (such as Matplotlib) that simplify the process of visualizing data.

import matplotlib.pyplot as plt

x = np.arange(20)
y = [x_i + np.random.randn(1) for x_i in x]
a, b = np.polyfit(x, y, 1)
plt.plot(x, y, 'o', np.arange(20), a*np.arange(20)+b, The '-');
Copy the code

You can now model your own neural networks using Colaboratory TensorFlow.

5. How to Google (Benefits)

Google Colaboratory is great and completely free! Which begs the question: How can I get to Google without a ladder?

The world is so big, I want to see! The red stone has taken into account everyone wants to go outside to see the spirit of learning, this, immediately recommend you a good tool. Keep a low profile, look and say nothing.

The SS account is recommended at thatseed.org:

www.thatseed.org/seedweb/web…

This is the need to pay, but the price is very cheap, is generally based on the flow of charges, I test a day down with almost 2 cents. After simple registration and recharge, you also need to download SS software.

You can also reply [SS] in the background of this public account to obtain the software!

Install and run SS software, need simple configuration, operation methods have a tutorial, and then check the server, according to your need to add, you know!

Very simple, tools will not be used, their own search, do not ask me oh, I do not know what ~ ~

Then, you can use Google DRIVE and Colaboratpry as much as you like!