You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "karam madi (Jira)" <ji...@apache.org> on 2022/08/15 13:29:00 UTC

[jira] [Commented] (OPENNLP-1383) Unload to perform document classification inference: class [[[F cannot be cast to class [[F ([[[F and [[F are in module java.base of loader 'bootstrap')

    [ https://issues.apache.org/jira/browse/OPENNLP-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17579706#comment-17579706 ] 

karam madi commented on OPENNLP-1383:
-------------------------------------

Hi everybody, the problem is resolved because I have used the old version of the transformers library; after the update, the problem has been resolved.

> Unload to perform document classification inference: class [[[F cannot be cast to class [[F ([[[F and [[F are in module java.base of loader 'bootstrap')
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-1383
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1383
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Deep Learning
>    Affects Versions: 2.0.0
>            Reporter: karam madi
>            Priority: Critical
>         Attachments: OpenNLP issue.PNG
>
>
> I am trying to infer many versions (Classification/ Sentiment Analysis) of Transformers models (fine-tuned) with the format .onnx using the OpenNLP library in java. I receive all the time the same error, which is "Unload to perform document classification inference: class [[[F cannot be cast to class [[F ([[[F and [[F are in module java. base of loader 'bootstrap')".
> This was in the "Infer" function of DocumentCategorizerInference class by executing getValue() in line 30. Could you please help me to know why I am receiving this exception?
> Note: I have also tried the test demo here:https://github.com/apache/opennlp/blob/master/opennlp-dl/src/test/java/opennlp/dl/doccat/DocumentCategorizerDLEval.java, and I got the same error.
> Thank you very much for your efforts.
> Aws khadour



--
This message was sent by Atlassian Jira
(v8.20.10#820010)