Share via


FormRecognizerClientExtensions.TrainCustomModelAsync Method

Definition

Train Model

public static System.Threading.Tasks.Task<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainResult> TrainCustomModelAsync (this Microsoft.Azure.CognitiveServices.FormRecognizer.IFormRecognizerClient operations, Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainRequest trainRequest, System.Threading.CancellationToken cancellationToken = default);
static member TrainCustomModelAsync : Microsoft.Azure.CognitiveServices.FormRecognizer.IFormRecognizerClient * Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainResult>
<Extension()>
Public Function TrainCustomModelAsync (operations As IFormRecognizerClient, trainRequest As TrainRequest, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TrainResult)

Parameters

operations
IFormRecognizerClient

The operations group for this extension method.

trainRequest
TrainRequest

Request object for training.

cancellationToken
CancellationToken

The cancellation token.

Returns

Remarks

The train request must include a source parameter that is either an externally accessible Azure Storage blob container Uri (preferably a Shared Access Signature Uri) or valid path to a data folder in a locally mounted drive. When local paths are specified, they must follow the Linux/Unix path format and be an absolute path rooted to the input mount configuration setting value e.g., if '{Mounts:Input}' configuration setting value is '/input' then a valid source path would be '/input/contosodataset'. All data to be trained are expected to be under the source. Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg' and 'image/png'." Other content is ignored when training a model.

Applies to