我有以下用于创建简单分类器的 IBM Watson Visual Recognition Python SDK:
with open(os.path.dirname("/home/xxx/Desktop/Husky.zip/"), 'rb') as dogs, \
open(os.path.dirname("/home/xxx/Desktop/Husky.zip/"), 'rb') as cats:
print(json.dumps(visual_recognition.create_classifier('Dogs Vs Cats',dogs_positive_examples=dogs,negative_examples=cats), indent=2))
带有新分类器 ID 及其状态的响应如下:
{
"status": "training",
"name": "Dogs Vs Cats",
"created": "2016-06-23T06:30:00.115Z",
"classes": [
{
"class": "dogs"
}
],
"owner": "840ad7db-1e17-47bd-9961-fc43f35d2ad0",
"classifier_id": "DogsVsCats_250748237"
}
训练状态显示失败。
打印(json.dumps(visual_recognition.list_classifiers(),缩进=4))
{
"classifiers": [
{
"status": "failed",
"classifier_id": "DogsVsCats_250748237",
"name": "Dogs Vs Cats"
}
]
}
这是什么原因?