arrow_back

運用 Vertex Explainable AI 解釋圖像分類模型

登录 加入
Quick tip: Review the prerequisites before you run the lab
Use an Incognito or private browser window to run this lab. This prevents any conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
欢迎加入我们的社区,一起测试和分享您的知识!
done
学习 700 多个动手实验和课程并获得相关技能徽章

運用 Vertex Explainable AI 解釋圖像分類模型

实验 1 小时 30 分钟 universal_currency_alt 5 积分 show_chart 中级
info 此实验可能会提供 AI 工具来支持您学习。
欢迎加入我们的社区,一起测试和分享您的知识!
done
学习 700 多个动手实验和课程并获得相关技能徽章

總覽

本實驗室將說明如何依據圖像資料訓練分類模型,並將模型部署至 Vertex AI,提供附有解釋的預測結果 (特徵歸因)。

學習目標

  1. 運用 Vertex AI 建構及訓練自訂圖像分類模型。
  2. 將模型部署至端點。
  3. 提供附有解釋的預測結果。
  4. 透過積分梯度以圖表呈現特徵歸因。

工作 0:設定和需求

在每個研究室中,您都能在固定時間內免付費建立新的 Google Cloud 專案,並使用一組資源。

  1. 請透過無痕式視窗登入 Qwiklabs。

  2. 請記下研究室的存取時間 (例如 1:15:00),並確保自己能在時間限制內完成作業。
    研究室不提供暫停功能。如有需要,您可以重新開始,但原先的進度恕無法保留。

  3. 準備就緒後,請按一下「Start lab」

  4. 請記下研究室憑證 (使用者名稱密碼),這組資訊將用於登入 Google Cloud 控制台。

  5. 按一下「Open Google Console」

  6. 按一下「Use another account」,然後複製這個研究室的憑證,並貼入提示訊息。
    如果使用其他憑證,系統會顯示錯誤或向您收取費用

  7. 接受條款,然後略過資源復原頁面。

啟用 Notebooks API

  1. 前往 Google Cloud 控制台,依序點選「導覽選單」>「API 和服務」>「程式庫」

  2. 搜尋「Notebooks API」並按下 Enter 鍵。

  3. 點選搜尋結果中的「Notebooks API」;若尚未啟用 API,請點選「啟用」

啟用 Vertex AI API

  1. 前往 Google Cloud 控制台,依序點選「導覽選單」>「Vertex AI」>「資訊主頁」

  2. 點選「啟用所有建議的 API」

點選「Check my progress」確認目標已達成。 啟用 Notebooks API 和 Vertex AI API

工作 1:開啟 Vertex AI Workbench 執行個體

  1. 前往 Google Cloud 控制台,依序點選「導覽選單」>「Vertex AI」>「Workbench」

  2. 在「執行個體」頁面點選「建立新項目」

  3. 請使用預設可用區和區域: 。 其他設定維持不變,然後點選「建立」。新的 VM 會在 2 到 3 分鐘內啟用。

  4. 點選「Open JupyterLab」。 JupyterLab 視窗會在新分頁中開啟。

點選「Check my progress」確認目標已達成。 建立 Vertex AI Workbench 執行個體

工作 2:複製 Vertex AI Workbench 執行個體中的課程存放區

如要複製 JupyterLab 執行個體中的筆記本,請按照下列步驟操作:

  1. 在 JupyterLab 中,開啟新的終端機視窗。

  2. 在指令列提示中執行下列指令:

git clone https://github.com/GoogleCloudPlatform/asl-ml-immersion.git cd asl-ml-immersion export PATH=$PATH:~/.local/bin make install
  1. 如要確認是否已複製存放區,請按兩下 asl-ml-immersion 目錄,確認可以查看內容。 此課程會用到的所有 Jupyter 筆記本實驗室檔案,都放在這個目錄。

點選「Check my progress」確認目標已達成。 複製 Vertex AI 平台 Notebooks 執行個體中的課程存放區

工作 3:透過 Vertex AI 啟用 TensorFlow 模型的可解釋性

  1. 在筆記本介面中,前往「asl-ml-immersion」>「notebooks」>「responsible_ai」>「explainable_ai」>「solutions」,然後開啟 xai_image_vertex.ipynb

  2. 在筆記本介面中,依序點選「編輯」>「清除所有輸出內容」

  3. 詳閱筆記本操作說明,然後執行筆記本中的所有內容。

提示:如要執行目前的儲存格,請點選儲存格,然後按下 Shift + Enter 鍵。如需其他儲存格指令,請查看筆記本 UI 中的「Run」部分。

關閉研究室

如果您已完成研究室,請按一下「End Lab」(關閉研究室)。Qwiklabs 會移除您已用的資源,並清除使用帳戶。

您可以為研究室的使用體驗評分。請選取合適的星級評等並提供意見,然後按一下「Submit」(提交)

星級評等代表您的滿意程度:

  • 1 星 = 非常不滿意
  • 2 星 = 不滿意
  • 3 星 = 普通
  • 4 星 = 滿意
  • 5 星 = 非常滿意

如果不想提供意見回饋,您可以直接關閉對話方塊。

如有任何想法、建議或指教,請透過「Support」(支援) 分頁提交。

Copyright 2022 Google LLC 保留所有權利。Google 和 Google 標誌是 Google LLC 的商標,其他公司和產品名稱則有可能是其關聯公司的商標。

Before you begin

  1. Labs create a Google Cloud project and resources for a fixed time
  2. Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
  3. On the top left of your screen, click Start lab to begin

Use private browsing

  1. Copy the provided Username and Password for the lab
  2. Click Open console in private mode

Sign in to the Console

  1. Sign in using your lab credentials. Using other credentials might cause errors or incur charges.
  2. Accept the terms, and skip the recovery resource page
  3. Don't click End lab unless you've finished the lab or want to restart it, as it will clear your work and remove the project

此内容目前不可用

一旦可用,我们会通过电子邮件告知您

太好了!

一旦可用,我们会通过电子邮件告知您

One lab at a time

Confirm to end all existing labs and start this one

Setup your console before you begin

Use an Incognito or private browser window to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.