GCP Task 3. Build and train your model locally in a Vertex notebook

訓練 Model

摘要

In this section, you will train your model locally using TensorFlow.

Note: This lab adapts and extends the official TensorFlow BERT text classification tutorial to utilize Vertex AI services. 

See the tutorial for additional coverage on fine-tuning BERT models using TensorFlow.

Build and compile a TensorFlow BERT sentiment classifier

  1. Fill out the #TODO section to add a hub.KerasLayer for BERT text preprocessing.
  2. Fill out the #TODO section to add a hub.KerasLayer for BERT text encoding.
  3. Fill out the #TODO section to save your BERT sentiment classifier locally. 
    You should save it to the ./bert-sentiment-classifier-local directory.

實作

1. Fill out the #TODO section to add a hub.KerasLayer for BERT text preprocessing.

※ 這邊要搜尋 # TODO 而不是 #TODO 否則會找不到正確位置 (我這邊是找 TODO)

參照

Build and Deploy Machine Learning Solutions with Vertex AI: Challenge Lab | Google Cloud Skills Boost

PS5