

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

# NTM 回應格式
<a name="ntm-in-formats"></a>

所有 Amazon SageMaker AI 內建的演算法，皆採用[常見的資料格式 - 推論](https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html)中所述之常見輸入推論格式。本主題包含 SageMaker AI NTM 演算法的可用輸出格式清單。

## JSON 回應格式
<a name="ntm-json"></a>

```
{
    "predictions":    [
        {"topic_weights": [0.02, 0.1, 0,...]},
        {"topic_weights": [0.25, 0.067, 0,...]}
    ]
}
```

## JSONLINES 回應格式
<a name="ntm-jsonlines"></a>

```
{"topic_weights": [0.02, 0.1, 0,...]}
{"topic_weights": [0.25, 0.067, 0,...]}
```

## RECORDIO 回應格式
<a name="ntm-recordio"></a>

```
[
    Record = {
        features = {},
        label = {
            'topic_weights': {
                keys: [],
                values: [0.25, 0.067, 0, ...]  # float32
            }
        }
    },
    Record = {
        features = {},
        label = {
            'topic_weights': {
                keys: [],
                values: [0.25, 0.067, 0, ...]  # float32
            }
        }
    }  
]
```