Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# DocumentLibrary.loadModel Method

Module: DocumentLibrary

## Definition

Loads a model into memory from the specified directory.

Python

    @staticmethod
    load_model(model_path: str, document_model: DocumentModel, processing_unit: ProcessingUnit) -> None

Parameters

> `model_path` str
> in The path to directory containing the AI model files.
> `document_model` DocumentModel
> in The AI model to be loaded.
> `processing_unit` ProcessingUnit
> in Processing unit to load the model into.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Dart

    static void loadModel(String? modelPath, DocumentModel documentModel, ProcessingUnit processingUnit)

Parameters

> `modelPath` String
> in The path to directory containing the AI model files.
> `documentModel` DocumentModel
> in The AI model to be loaded.
> `processingUnit` ProcessingUnit
> in Processing unit to load the model into.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C#

    public static void LoadModel(string modelPath, DocumentModel documentModel, ProcessingUnit processingUnit)

Parameters

> `modelPath` string
> in The path to directory containing the AI model files.
> `documentModel` DocumentModel
> in The AI model to be loaded.
> `processingUnit` ProcessingUnit
> in Processing unit to load the model into.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Java

    public static void loadModel(String modelPath, DocumentModel documentModel, ProcessingUnit processingUnit) throws DocumentException

Parameters

> `modelPath` String
> in The path to directory containing the AI model files.
> `documentModel` DocumentModel
> in The AI model to be loaded.
> `processingUnit` ProcessingUnit
> in Processing unit to load the model into.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Swift

    public static func loadModel(modelPath: String, documentModel: DocumentModel, processingUnit: ProcessingUnit) throws

Parameters

> `modelPath` String
> in The path to directory containing the AI model files.
> `documentModel` DocumentModel
> in The AI model to be loaded.
> `processingUnit` ProcessingUnit
> in Processing unit to load the model into.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C

    int id3DocumentLibrary_LoadModel (
        const char * modelPath,
        id3DocumentModel eDocumentModel,
        id3DocumentProcessingUnit eProcessingUnit)

Parameters

> `modelPath` const char *
> in The path to directory containing the AI model files.
> `eDocumentModel` id3DocumentModel
> in The AI model to be loaded.
> `eProcessingUnit` id3DocumentProcessingUnit
> in Processing unit to load the model into.

Returns

> `int`
> An error code.
> See id3DocumentError file for the list of possible error codes.