

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用飛輪進行分析
<a name="flywheels-inference"></a>

您可以使用飛輪的作用中模型版本來執行自訂分類或實體辨識的分析。作用中模型版本是可設定的。您可以使用 [主控台](flywheels-iterate.md#flywheels-iterate-console-promote)或 [UpdateFlywheel](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_UpdateFlywheel.html) API 操作，將新版本的模型設定為作用中的模型版本。

若要使用飛輪，請在設定分析任務時指定飛輪 ARN，而非自訂模型 ARN。Amazon Comprehend 會使用飛輪的作用中模型版本執行分析。

## 即時分析
<a name="flywheels-inference-console"></a>

您可以使用 端點來執行即時分析。當您建立或更新端點時，您可以使用飛輪 ARN 來設定它，而不是模型 ARN。當您執行即時分析時，請選取與飛輪相關聯的端點。Amazon Comprehend 會使用飛輪的作用中模型版本執行分析。

當您使用 [UpdateFlywheel](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_UpdateFlywheel.html) 為飛輪設定新的作用中模型版本時，端點會自動更新以開始使用新的作用中模型版本。如果您不希望端點自動更新，請將端點 （使用 [UpdateEndpoint](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_UpdateEndpoint.html)) 設定為直接使用模型版本 ARN。如果飛輪作用中模型版本變更，端點會繼續使用此模型版本。

對於自訂分類，請使用 [ClassifyDocument](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_ClassifyDocument.html) API 操作。對於自訂實體辨識，請使用 [DetectEntities](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_DetectEntities.html) API 請求。在 **EndpointArn** 參數中提供飛輪的端點。

您也可以使用 主控台執行[自訂分類](custom-sync.md)或[自訂實體辨識](detecting-cer-real-time.md)的即時分析。

## 非同步任務
<a name="flywheels-inference-api"></a>

對於自訂分類，請使用 [StartDocumentClassificationJob](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_StartDocumentClassificationJob.html) API 請求來啟動異步任務。提供 **FlywheelArn** 參數，而非 **DocumentClassifierArn**。

對於自訂實體辨識，請使用 [StartEntitiesDetectionJob](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_StartEntitiesDetectionJob.html) API 請求。提供 **FlywheelArn** 參數，而非 **EntityRecognizerArn**。

您可以使用 主控台來執行非同步分析任務，以進行[自訂分類](analysis-jobs-custom-classifier.md)或[自訂實體辨識](detecting-cer.md)。當您建立任務時，請在**辨識器模型**或**分類器模型**欄位中輸入飛輪 ARN。