UiPath Documentation
document-understanding
2021.10
false
Document Understanding 用户指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

训练管道

重要提示:

最小数据集大小

为了成功运行训练管道,我们强烈建议数据集中的每个已标记字段至少具有 25 个文档和 10 个样本。否则,管道将引发以下错误:Dataset Creation Failed

在 GPU 与 CPU 上进行训练

对于较大的数据集,您需要使用 GPU 进行训练。但是,使用 GPU(AI 机器人 Pro)进行训练至少比使用 CPU(AI 机器人)进行训练慢 5 倍。

对于 v21.10.x ML 包,在 CPU 上训练仅支持大小不超过 5000 页的数据集,而对于其他版本的 ML 包,在 CPU 上训练的限制为最多 1000 页。在 CPU 而非 GPU 上进行训练也可能导致模型准确性降低(介于 0-5% 之间)。

在 2021.10 版本之前,在 CPU 上训练的限制为 500 页,对于 2021.10 版本,其增加到 5000 页,对于 2022.4 版本,其将减少到最多 1000 页。

有两种方法可以训练 ML 模型:

  • 从头开始训练模型
  • 重新训练开箱即用模型

可以使用 DocumentUnderstanding ML 包从头开始训练模型,该包在作为输入提供的数据集上执行此操作。

可以使用开箱即用的 ML 包(例如发票、收据、采购订单、水电费账单、印度发票、澳大利亚发票等)重新训练模型,基本上可以使用除 Document Understanding 以外的任何其他数据提取 ML 包。使用其中一个包进行训练时会产生另外一个输入:基本模型。我们将此称为重新训练,因为您不是从头开始,而是从基本模型开始。这种方法使用了一种称为“迁移学习”的技术,模型会利用另一个预先存在的模型中编码的信息。该模型保留了一些开箱即用的知识,但也会从新数据中学习。但是,随着训练数据集大小的增加,预训练的基本模型会越来越不重要。它主要与中小型训练数据集(最多 500-800 页)相关。

按如下方式配置训练管道:

  • 在“管道类型”字段中,选择“训练运行”

  • In the Choose package field, select the package you created based on an out-of-the-box ML package.

  • 在“选择包主要版本”字段中,选择包的主要版本。

  • “选择包次要版本”字段中,选择包的次要版本。强烈建议始终使用次要版本 0(零)。

  • In the Choose input dataset field, select a representative training dataset.

  • In the Enter parameters section, enter any environment variables defined and used by your pipeline, if any. For most use cases, no parameter needs to be specified; the model is using advanced techniques to find a performant configuration. However, here are some environment variables you could use:

  • auto_retraining which allows you to complete the Auto-retraining Loop; if the variable is set to True, then the input dataset needs to be the export folder associated with the labeling session where the data is tagged; if the variable remains set to False, then the input dataset needs to correspond to the following dataset format.

  • model.epochs,用于自定义训练管道的时期数(默认值为 100)。

  • 选择是在 GPU 还是 CPU 上训练管道。默认情况下, “启用 GPU”滑块处于禁用状态,在这种情况下,管道将在 CPU 上进行训练。

  • Select one of the options when the pipeline should run: Run now,Time based or Recurring. In case you are using the auto_retraining variable, select Recurring.

After you configure all the fields, click Create. The pipeline is created.

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新