arrow_back

Classifying Images with pre-built TF Container on Vertex AI

ログイン 参加
700 以上のラボとコースにアクセス

Classifying Images with pre-built TF Container on Vertex AI

ラボ 1時間 30分 universal_currency_alt クレジット: 5 show_chart 上級
info このラボでは、学習をサポートする AI ツールが組み込まれている場合があります。
700 以上のラボとコースにアクセス

Overview

In this lab, you learn how to implement different image models on MNIST using the tf.keras API.

Learning objectives

  1. Understand how to build a Dense Neural Network (DNN) for image classification.
  2. Understand how to use dropout (DNN) for image classification.
  3. Understand how to use Convolutional Neural Networks (CNN).
  4. Know how to deploy and use an image classifcation model using Google Cloud's Vertex AI.

Task 0. Setup and requirements

For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.

  1. Sign in to Qwiklabs using an incognito window.

  2. Note the lab's access time (for example, 1:15:00), and make sure you can finish within that time.
    There is no pause feature. You can restart if needed, but you have to start at the beginning.

  3. When ready, click Start lab.

  4. Note your lab credentials (Username and Password). You will use them to sign in to the Google Cloud Console.

  5. Click Open Google Console.

  6. Click Use another account and copy/paste credentials for this lab into the prompts.
    If you use other credentials, you'll receive errors or incur charges.

  7. Accept the terms and skip the recovery resource page.

Task 1. Create a Cloud Storage bucket

  1. Navigate to Navigation menu > Cloud Storage in the Cloud console for your project, then click CREATE BUCKET.

  2. Set a unique name (use your project ID because it is unique) and then choose region as . Then, click Create.

  3. Confirm Enforce public access prevention on this bucket on "Public access will be prevented" pop-up.

Click Check my progress to verify the objective. Create a cloud storage bucket

Task 2. Launch a Vertex AI Workbench instance

  1. In the Google Cloud console, from the Navigation menu (Navigation menu), select Vertex AI.

  2. Click Enable All Recommended APIs.

  3. In the Navigation menu, click Workbench.

    At the top of the Workbench page, ensure you are in the Instances view.

  4. Click add boxCreate New.

  5. Configure the Instance:

    • Name: lab-workbench
    • Region: Set the region to
    • Zone: Set the zone to
    • Advanced Options (Optional): If needed, click "Advanced Options" for further customization (e.g., machine type, disk size).

Create a Vertex AI Workbench instance

  1. Click Create.

This will take a few minutes to create the instance. A green checkmark will appear next to its name when it's ready.

  1. Click OPEN JUPYTERLAB next to the instance name to launch the JupyterLab interface. This will open a new tab in your browser.

Workbench Instance Deployed

Click Check my progress to verify the objective. Create Vertex AI Platform Workbench instance

Task 3. Clone a course repo within your Vertex AI Workbench instance

To clone the training-data-analyst notebook in your JupyterLab instance:

Step 1

In JupyterLab, click the Terminal icon to open a new terminal.

Open Terminal

Step 2

At the command-line prompt, type in the following command and press Enter.

git clone https://github.com/GoogleCloudPlatform/training-data-analyst

Step 3

Confirm that you have cloned the repository by double clicking on the training-data-analyst directory and ensuring that you can see its contents. The files for all the Jupyter notebook-based labs throughout this course are available in this directory.

Training data analyst repository

Click Check my progress to verify the objective. Clone course repo within your Vertex AI Platform Workbench instance

Task 4. Classify images with pre-built TF container on Vertex AI

  1. In the notebook interface, navigate to training-data-analyst > courses > machine_learning > deepdive2 > computer_vision_fun > labs and open classifying_images_with_pre-built_tf_container_on_vertex_ai.ipynb.

  2. In the Select Kernel dialog, choose TensorFlow 2-11 (Local) from the list of available kernels.

  3. In the notebook interface, click Edit > Clear All Outputs.

  4. Carefully read through the notebook instructions and fill in lines marked with #TODO where you need to complete the code.

Tip: To run the current cell, click the cell and press SHIFT+ENTER. Other cell commands are listed in the notebook UI under Run.

  • Hints may also be provided for the tasks to guide you. Highlight the text to read the hints, which are in white text.
  • To view the complete solution, navigate to training-data-analyst > courses > machine_learning > deepdive2 > computer_vision_fun > solutions, and open classifying_images_with_pre-built_tf_container_on_vertex_ai.ipynb.

Click Check my progress to verify the objective. Classify images with pre-built TF container on Vertex AI

End your lab

When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.

You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.

The number of stars indicates the following:

  • 1 star = Very dissatisfied
  • 2 stars = Dissatisfied
  • 3 stars = Neutral
  • 4 stars = Satisfied
  • 5 stars = Very satisfied

You can close the dialog box if you don't want to provide feedback.

For feedback, suggestions, or corrections, please use the Support tab.

Copyright 2022 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

始める前に

  1. ラボでは、Google Cloud プロジェクトとリソースを一定の時間利用します
  2. ラボには時間制限があり、一時停止機能はありません。ラボを終了した場合は、最初からやり直す必要があります。
  3. 画面左上の [ラボを開始] をクリックして開始します

シークレット ブラウジングを使用する

  1. ラボで使用するユーザー名パスワードをコピーします
  2. プライベート モードで [コンソールを開く] をクリックします

コンソールにログインする

    ラボの認証情報を使用して
  1. ログインします。他の認証情報を使用すると、エラーが発生したり、料金が発生したりする可能性があります。
  2. 利用規約に同意し、再設定用のリソースページをスキップします
  3. ラボを終了する場合や最初からやり直す場合を除き、[ラボを終了] はクリックしないでください。クリックすると、作業内容がクリアされ、プロジェクトが削除されます

このコンテンツは現在ご利用いただけません

利用可能になりましたら、メールでお知らせいたします

ありがとうございます。

利用可能になりましたら、メールでご連絡いたします

1 回に 1 つのラボ

既存のラボをすべて終了して、このラボを開始することを確認してください

シークレット ブラウジングを使用してラボを実行する

このラボの実行には、シークレット モードまたはシークレット ブラウジング ウィンドウを使用してください。これにより、個人アカウントと受講者アカウントの競合を防ぎ、個人アカウントに追加料金が発生することを防ぎます。