Calling predict with input_feed of wrong length doesn't raise an error?
gsdean opened this issue · 4 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.
Added test cases for existing behavior: https://github.com/ankane/onnxruntime/blob/69afc68b22b34bc0aeadef9292cafdfe426ae394/test/onnxruntime_test.rb#L124-L138
Great to hear, I'll check out the latest, thanks
confirmed, the behavior in 0.2.2 is correct. Thanks