【问题标题】:Cannot execute learning task. : Unable to create retraining task - previous training data not present无法执行学习任务。 :无法创建再训练任务 - 以前的训练数据不存在
【发布时间】:2018-07-27 10:35:15
【问题描述】:

我正在尝试更新分类器。在 zip 文件夹中,我有 10 多张图片。但是还是不能更新。

通过招摇网址尝试:https://watson-api-explorer.ng.bluemix.net/apis/visual-recognition-v3#!/Custom/updateClassifier

网址:https://gateway.watsonplatform.net/visual-recognition/api/v3/classifiers/sports_cars_1042527461?version=2018-03-19&api_key=xxxxxxxxxxxxxx

卷曲:curl -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' {"type":"formData"} 'https://gateway.watsonplatform.net/visual-recognition/api/v3/classifiers/sports_cars_1042527461?version=2018-03-19&api_key=xxxxx'

回复:{ "error": { "code": 400, "error_id": "input_error", "description": "Cannot execute learning task. : Unable to create retraining task - previous training data not present." } }

也用Node JS 代码尝试过,但得到了同样的错误。

有什么我错过或尝试了错误的地方吗?

【问题讨论】:

    标签: ibm-watson visual-recognition


    【解决方案1】:

    我注意到的一件事是,您对旧分类器和新分类器混合使用了 URL 和身份验证。

    对于 5 月 23 日之前创建的分类器,您使用 URL gateway-a.&api_key=...

    对于之后创建的分类器,您使用 URL gateway. 和 IAM 身份验证 (-u "apikey:{apikey}")。

    所以

    curl -X POST \
    -F "sportscars_positive_examples=@sc.zip" \
    -F "negative_examples=@suvs.zip" \ 
    "https://gateway-a.watsonplatform.net/visual-recognition/api/v3/classifiers
        /sports_cars_1042527461?version=2018-03-19&api_key=xxxxxxxxxxxxxx"
    

    curl -X POST -u "apikey:yyyyyyyyyyyyyyyyyyy" \
    -F "sportscars_positive_examples=@sc.zip" \
    -F "negative_examples=@suvs.zip" \ 
    "https://gateway.watsonplatform.net/visual-recognition/api/v3/classifiers
        /sports_cars_1042527461?version=2018-03-19"
    

    详情请看API reference

    【讨论】:

      猜你喜欢
      • 2014-02-10
      • 2019-07-11
      • 2019-01-21
      • 1970-01-01
      • 1970-01-01
      • 2020-05-21
      • 2014-07-22
      • 1970-01-01
      • 2012-08-20
      相关资源
      最近更新 更多