This page describes how to get started using TensorFlow Enterprise with a Deep Learning VM instance.
In this example, you create a TensorFlow Enterprise Deep Learning VM instance, connect to the instance using SSH, open a JupyterLab notebook, and run a classification tutorial on using neural networks with Keras.
Before you begin
- 登录您的 Google Cloud 帐号。如果您是 Google Cloud 新手，请创建一个帐号来评估我们的产品在实际场景中的表现。新客户还可获享 $300 赠金，用于运行、测试和部署工作负载。
在 Google Cloud Console 的项目选择器页面上，选择或创建一个 Google Cloud 项目。
确保您的 Cloud 项目已启用结算功能。 了解如何确认您的项目是否已启用结算功能。
Create a Deep Learning VM instance
To create a TensorFlow Enterprise Deep Learning VM instance, complete these steps:
Go to the Deep Learning VM Cloud Marketplace page in the Google Cloud Console.
Click Launch on Compute Engine. If you see a project selection window, choose the project in which to create the instance. If this is the first time you've launched Compute Engine, you must wait for the initial API configuration process to complete.
On the New Deep Learning VM deployment page, enter a Deployment name. This will be the root of your virtual machine name. Compute Engine appends
-vmto this name when creating your instance.
Under Number of GPUs, select None. You won't need them to complete the instructions in this guide.
Under Framework, select TensorFlow Enterprise 2.1 (CUDA 10.1).
For this example, you can leave the remaining settings as they are.
You've just created your first instance of a Deep Learning VM. After the instance is created, the Deployment Manager opens. This is where you can manage your Deep Learning VM instance and other deployments.
Connect with SSH, open a notebook, and run a classification tutorial
Complete these steps to set up an SSH connection to your Deep Learning VM instance, open a JupyterLab notebook, and run a tutorial on using neural networks with Keras:
To complete these steps, you can use either Cloud Shell or any environment where the Cloud SDK can be installed. Cloud Shell and Cloud SDK are command line tools that you can use to interface with your instance.
If you want to use Cloud Shell, in Google Cloud, in the upper-right corner, click the Activate Cloud Shell button.
If you want to use Cloud SDK, download and install Cloud SDK on your local machine.
In Cloud Shell or in a local terminal window, use the following command to create an SSH connection to your instance. Replace my-project-id, my-zone, and my-instance-name with the relevant information.
gcloud compute ssh --project my-project-id --zone my-zone \ my-instance-name -- -L 8080:localhost:8080
In your local browser, visit http://localhost:8080 to access a JupyterLab notebook that is included in your instance by default.
In the notebook, on the left, double-click tutorials to open the folder, and navigate to and open tutorials/tf2_course/01_neural_nets_with_keras.ipynb.
Click the run buttonto run cells of the tutorial.
- Learn more about Deep Learning VM.
- Get started using TensorFlow Enterprise with Deep Learning Containers.
- Get started using TensorFlow Enterprise with AI Platform Notebooks.