FormRecognizerClient.TrainCustomModelWithHttpMessagesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Train Model
public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainResult>> TrainCustomModelWithHttpMessagesAsync (Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainRequest trainRequest, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member TrainCustomModelWithHttpMessagesAsync : Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainRequest * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainResult>>
override this.TrainCustomModelWithHttpMessagesAsync : Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainRequest * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainResult>>
Public Function TrainCustomModelWithHttpMessagesAsync (trainRequest As TrainRequest, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of TrainResult))
Parameters
- trainRequest
- TrainRequest
Request object for training.
- customHeaders
- Dictionary<String,List<String>>
Headers that will be added to request.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
Implements
Exceptions
Thrown when the operation returned an invalid status code
Thrown when unable to deserialize the response
Thrown when a required parameter is null
Thrown when a required parameter is null
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.