hshatti / TONNXRuntime

TOnnxRuntime is a Microsoft ONNXRuntime AI and Machine Learning Library for Freepascal / Delphi
MIT License
49 stars 10 forks source link

Error when pass unorder input name. #2

Closed BstNst99 closed 1 year ago

BstNst99 commented 1 year ago

I run on onnx for Input name ('obs_0', 'action_masks'), It will error null for action_masks because It can't find key 'action_masks' due you find key in unsort key with BinSearch function.

I fix by replace all BinSearch with i:=IndexOfKey(Key); // i:= TTools.BinSearch(Keys ,key,Length(Keys));

Thank you. onnx

hshatti commented 1 year ago

Thanks for spotting this issue, it will be fixed in the next push Cheers H