Open neillbyrne opened 1 year ago
Hi, and thanks for the interest / feedback. As you correctly noted, this is currently hard-coded to return only the first output.
The type parameter you tried to use to select the output is just a tensor type denotation, which can be anything, but the type of which can be enforced at compile-time.
In the short term, I'll use the tensor type denotation to try to grab the output with the matching name, and if it doesn't exist fall back to the first output. So you will still need to run things once per output you want, but at least you can select an output other than the first.
Longer-term, it would make sense to add a way to return multiple outputs. I'll just need to consider exactly how best to do that while maintaining type safety.
Sounds great @EmergentOrder . Many thanks for all your work!, feel free to close the issue
Hi, firstly thanks for this application, its much appreciated
Im struggling to run an onnx model which uses more than a single output
I can get the first output values
logits
which has a dimension of (batch_size 86 1) fine with the following code, where I am using a single sample example with an input dimension of (batch_size * num_words), the last dimension being an array of word tokens ids (integers) which in this case is 3 for this example but is dynamicBut the second output
alphas
doesn't seem accessible, it has dimensions (batch_size 86 num_words) or 1 86 3 for this example. I have tried running the model again to get the alphas, but it doesn't seem to workIt raises a bunch of errors (which I suspect are due to incorrect shape in the spec)
I guess the most confusing part (besides this being my first foray into Scala!) is that the second parameter in the specification (which I assumed was the name of the output) seems to accept any string and access the first output
logits
, e.g.works fine and returns the
logits
outputMany thanks in advance!