

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

# 適用於 Object2Vec 訓練的資料格式
<a name="object2vec-training-formats"></a>

使用 Object2Vec 演算法進行訓練時，請確定請求中的輸入資料為 JSON Lines 格式，其中每一行代表單一資料點。

## 輸入：JSON 行請求格式
<a name="object2vec-in-training-data-jsonlines"></a>

Content-type: application/jsonlines

```
{"label": 0, "in0": [6, 17, 606, 19, 53, 67, 52, 12, 5, 10, 15, 10178, 7, 33, 652, 80, 15, 69, 821, 4], "in1": [16, 21, 13, 45, 14, 9, 80, 59, 164, 4]}
{"label": 1, "in0": [22, 1016, 32, 13, 25, 11, 5, 64, 573, 45, 5, 80, 15, 67, 21, 7, 9, 107, 4], "in1": [22, 32, 13, 25, 1016, 573, 3252, 4]}
{"label": 1, "in0": [774, 14, 21, 206], "in1": [21, 366, 125]}
```

"in0" 和 "in1" 分別是 encoder0 和 encoder1 的輸入。相同的格式對分類和迴歸問題均有效。若是迴歸問題，`"label"` 欄位可接受實際值輸入。