kotlindl icon indicating copy to clipboard operation
kotlindl copied to clipboard

Refactor OnnxInferenceModel to reduce code duplication

Open ermolenkodev opened this issue 2 years ago • 1 comments

I think it would be a good idea to unify this (predictSoftly) method with predictRaw (as a separate PR).

Originally posted by @juliabeliaeva in https://github.com/JetBrains/KotlinDL/pull/356#discussion_r852313090

ermolenkodev avatar Apr 20 '22 06:04 ermolenkodev

Keep in mind the predictSoftly method for the TensorFlow models before refactoring

The initial idea of the predictSoftly method is the following: return the vector of probabilities instead of the class label calculated via argmax on the vector of probabilities.

The semantic for the predictRaw is more common – to return just low-level output with a few tensors, for example, not just 1D vector

zaleslaw avatar Apr 21 '22 07:04 zaleslaw