【问题标题】:Automating both Uploading the training data label csv and Training processed the model in AutoML Vision Image classification自动上传训练数据标签 csv 和训练处理 AutoML Vision 图像分类中的模型
【发布时间】:2019-11-28 15:33:07
【问题描述】:

我必须手动上传训练数据标签 CSV 并点击“训练”来训练模型。我想最好用 python 自动化所有这些。

【问题讨论】:

    标签: python google-cloud-platform automl google-cloud-automl


    【解决方案1】:

    您可以使用google-cloud-automl 通过 Python 自动执行此操作。例如:

    from google.cloud import automl_v1beta1
    
    client = automl_v1beta1.AutoMlClient()
    
    parent = client.location_path('[PROJECT]', '[LOCATION]')
    
    # Create the dataset
    dataset = {} . # TODO: Initialize `dataset`
    response = client.create_dataset(parent, dataset)
    
    # Create the model
    model = {}  # TODO: Initialize `model`
    response = client.create_model(parent, model)
    
    def callback(operation_future):
        result = operation_future.result()  # Handle result
    
    response.add_done_callback(callback)
    metadata = response.metadata()
    

    【讨论】:

    • 但是我仍然需要通过点击“训练”来训练模型。
    【解决方案2】:

    我使用 AutoML RESTapi 创建数据集来训练模型。虽然如果我想在更多数据上重新训练模型,我必须删除之前训练的模型并创建并训练一个新模型。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-01
      • 2021-07-29
      • 2020-10-05
      • 2021-07-09
      • 2021-10-16
      • 2020-10-01
      • 2018-02-13
      • 2015-10-25
      相关资源
      最近更新 更多