[
https://issues.apache.org/jira/browse/OPENNLP-1979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla closed OPENNLP-1979.
------------------------------------
Resolution: Fixed
Fixed by https://github.com/apache/opennlp/pull/1310 (6331d6e19).
> SentenceVectorsDL fails with a ClassCastException on models whose first
> output is a pooled [batch, hidden] tensor
> -----------------------------------------------------------------------------------------------------------------
>
> Key: OPENNLP-1979
> URL: https://issues.apache.org/jira/browse/OPENNLP-1979
> Project: OpenNLP
> Issue Type: Bug
> Reporter: Richard Zowalla
> Priority: Major
> Fix For: 3.0.0
>
>
> {{SentenceVectorsDL}} casts the first model output to {{float\[\]\[\]\[\]}}
> \({{\[batch, sequence, hidden\]}}\). Many sentence\-transformers ONNX exports
> expose {{sentence\_embedding}} with shape {{\[batch, hidden\]}} as the first
> output, which makes the cast throw {{ClassCastException}}. The output should
> be selected by name and by rank, and a pooled 2\-D output used as it is.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)