TensorFlow For Dummies
Book image
Explore Book Buy On Amazon
If you want to take advantage of the Google Cloud Platform (GCP)’s features, the first step is to create a project. This project serves as the central container of your development effort and includes all your metadata and configuration files. Before you can execute code or launch a web application, you need to upload the files to your project. Similarly, if you’d like access to special features, you need to make requests through the project.

To build a GCP project that can access the ML Engine, you need to perform three steps:

  1. Create a project in the Google Developer Console.
  2. Enable billing for the project.
  3. Enable the project to access the Machine Learning Engine.

Creating a new project

Anyone with a valid email address can create a GCP project without any fees or obligations. The process involves five steps:
  1. Visit the Cloud Console.
  2. If this is your first time visiting the console, provide a contact email address and a password.
  3. In the upper horizontal bar, click Select a Project.
  4. In the Select dialog box, click the plus button on the right.
  5. In the New Project page, enter a project name and click the Create button.
When working with the GCP, you need to understand the difference between a project's name and ID. A project’s name is chosen by the developer, and the console uses it to display the current project.

In contrast, a project’s ID is chosen by the GCP based on the project’s name, and it uniquely identifies the project across all projects in the GCP. If you want to upload code or change a project's configuration, you’ll need to access your project by its ID. Therefore, it’s a good idea to know the IDs of your projects.


Machine learning is a powerful capability, but unlike TensorFlow, it’s not free. Google’s fees for machine learning depend on three factors: the type of operation (training or prediction), the length of time, and your location:
  • Training: $0.49 per hour per training unit in the U.S., $0.54 in Europe and Asia
  • Prediction: $0.10 per thousand predictions plus $0.40 per hour in the U.S., $0.11 per thousand predictions plus $0.44 per hour in Europe and Asia
Google charges money after you use the ML Engine, not in advance. But you need to identify a means of payment before you use the engine, and you can configure this by associating your project with a billing account:
  1. Visit your project page in the Cloud Console.
  2. Open the menu (three horizontal bars) in the upper-left and select the Billing option.
  3. Click the button entitled Add billing account.
  4. Enter your contact information and billing information.
At the bottom of the page, a button lets you set up automatic payment, which authorizes Google to withdraw funds from the account as resources are used.

Accessing the machine learning engine

After you set up a billing account for your project, you can access paid features like the ML Engine. To enable this feature, open the menu in the upper-left of the project page and select APIs & Services. This opens the APIs & Services page, which identifies the features that the project can access.

The left side of the page displays three links: Dashboard, Library, and Credentials. The Library link opens a page that lists the APIs available for your project. To enable access to the ML Engine, you need to perform five steps:

  1. From the APIs & Services page, click the Library link to the left.
  2. Find the Machine Learning group and click the View All link to the right.
  3. Click the link entitled Google Cloud Machine Learning Engine.
  4. Click the Enable link at the top of the page.
  5. Wait until the GCP grants access to the new capability.
After performing these steps, you can verify that your project can access the ML Engine by visiting the APIs & Services dashboard. The lower part of the page lists the different APIs your project can access, and this should include Google Cloud Storage and the Google Cloud Machine Learning Engine.

About This Article

This article is from the book:

About the book author:

Matthew Scarpino has been a programmer and engineer for more than 20 years. He has worked extensively with machine learning applications, especially those involving financial analysis, cognitive modeling, and image recognition. Matthew is a Google Certified Data Engineer and blogs about TensorFlow at tfblog.com.

This article can be found in the category: