

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

# 適用於管道模式訓練的擴增資訊清單檔案格式
<a name="augmented-manifest-stream"></a>

擴增的資訊清單格式可讓您在管道模式中使用檔案進行訓練，而無需建立 RecordIO 檔案。您需要為 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html) 請求的 `InputDataConfig` 參數值指定訓練和驗證通道。僅支援使用管道輸入模式之通道的擴增資訊清單檔案。每個通道的資料都是從它的擴增資訊清單檔案擷取，並透過通道的具名管道 (依序) 串流至演算法。管道模式使用先入先出 (FIFO)，所以記錄會依其佇列順序處理。如需管道輸入模式的資訊，請參閱 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Channel.html#SageMaker-Type-Channel-InputMode](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Channel.html#SageMaker-Type-Channel-InputMode)。

屬性名稱與 `"-ref"` 尾碼指向預先格式化的二進位資料。在某些情況下，演算法知道如何剖析資料。但有時候您可能需要包裝資料，針對演算法分隔記錄。如果演算法與 [RecordIO 格式的資料](https://mxnet.apache.org/api/architecture/note_data_loading#data-format)相容，針對 `RecordWrapperType` 指定 `RecordIO` 可解決這個問題。如果演算法與 `RecordIO` 格式不相容，請針對 `RecordWrapperType` 指定 `None`，確保您的資料針對演算法正確剖析。

以 `["image-ref", "is-a-cat"]` 為例，如果您使用 RecordIO 包裝，則以下的資料串流會傳送到佇列：

`recordio_formatted(s3://amzn-s3-demo-bucket/foo/image1.jpg)recordio_formatted("1")recordio_formatted(s3://amzn-s3-demo-bucket/bar/image2.jpg)recordio_formatted("0")`

未使用 RecordIO 格式包裝的影像，會和對應的 `is-a-cat` 屬性值串流為一筆記錄。這會導致問題，因為演算法可能不會正確分隔影像和屬性。有關使用增強清單文件進行影像分類的詳細資訊，請參閱[使用增強清單圖像格式進行訓練](https://docs.aws.amazon.com/sagemaker/latest/dg/image-classification.html#IC-augmented-manifest-training)。

在一般情況下使用擴增資訊清單檔案和管道模式，EBS 磁碟區的大小限制並不適用。此情況包括必須在 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_S3DataSource.html#SageMaker-Type-S3DataSource-S3DataDistributionType                 ](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_S3DataSource.html#SageMaker-Type-S3DataSource-S3DataDistributionType                 ) 這類 EBS 磁碟區大小限制內的設定。如需管道模式及其使用方法的詳細資訊，請參閱[使用自有的訓練演算法 – 輸入資料組態](your-algorithms-training-algo.html#your-algorithms-training-algo-running-container-inputdataconfig)。