|
throw new UnsupportedOperationException("Not implemented"); |
For NLP.TEXT_CLASSIFICATION the TextClassificationTranslator will fail because this is not implemented. I've written my own which basically does the exact same thing just removes the call to argSort (I didn't need sorted labels). But without it all those models will not work out of the box from my testing.
This is the line that is calling it
|
long[] indices = logits.argSort(-1, false).toLongArray(); |
djl/extensions/tokenizers/src/main/java/ai/djl/engine/rust/RustLibrary.java
Line 319 in 1d6e058
For NLP.TEXT_CLASSIFICATION the TextClassificationTranslator will fail because this is not implemented. I've written my own which basically does the exact same thing just removes the call to argSort (I didn't need sorted labels). But without it all those models will not work out of the box from my testing.
This is the line that is calling it
djl/extensions/tokenizers/src/main/java/ai/djl/huggingface/translator/TextClassificationTranslator.java
Line 115 in 1d6e058