ankane / onnxruntime-ruby

Run ONNX models in Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calling predict with input_feed of wrong length doesn't raise an error?

gsdean opened this issue · comments

Seems like the Ruby API is inconsistent with the Python API in that this is an error condition. In Ruby we can do things like model.predict(float_input: []), whereas in Python this would rase an error when the model expects inputs.

Note: This is true any input length that doesn't match the expected size

Happy to take a stab at a PR for this, but wanted feedback as this would be a breaking change...

Hey @gsdean, happy to review a PR. The latest version returns Got invalid dimensions for input in some cases where there's a mismatch, but it's possible not everything is covered.

Great to hear, I'll check out the latest, thanks

confirmed, the behavior in 0.2.2 is correct. Thanks