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

# DocumentLibrary.unloadModel Method

Module: DocumentLibrary

## Definition

Unloads a model from memory.

Python

    @staticmethod
    unload_model(document_model: DocumentModel, processing_unit: ProcessingUnit) -> None

Parameters

> `document_model` DocumentModel
> in The AI model to be unloaded.
> `processing_unit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

Dart

    static void unloadModel(DocumentModel documentModel, ProcessingUnit processingUnit)

Parameters

> `documentModel` DocumentModel
> in The AI model to be unloaded.
> `processingUnit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

C#

    public static void UnloadModel(DocumentModel documentModel, ProcessingUnit processingUnit)

Parameters

> `documentModel` DocumentModel
> in The AI model to be unloaded.
> `processingUnit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

Java

    public static void unloadModel(DocumentModel documentModel, ProcessingUnit processingUnit) throws DocumentException

Parameters

> `documentModel` DocumentModel
> in The AI model to be unloaded.
> `processingUnit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

Swift

    public static func unloadModel(documentModel: DocumentModel, processingUnit: ProcessingUnit) throws

Parameters

> `documentModel` DocumentModel
> in The AI model to be unloaded.
> `processingUnit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

C

    int id3DocumentLibrary_UnloadModel (
        id3DocumentModel eDocumentModel,
        id3DocumentProcessingUnit eProcessingUnit)

Parameters

> `eDocumentModel` id3DocumentModel
> in The AI model to be unloaded.
> `eProcessingUnit` id3DocumentProcessingUnit
> in The processing unit used for the model.

Returns

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