grimoire / torch2trt_dynamic

A pytorch to tensorrt convert with dynamic shape support
MIT License
254 stars 34 forks source link

Does int8 calibration DatasetCalibrator buffer support multiple inputs? #17

Closed 0yueyunfei0 closed 3 years ago

0yueyunfei0 commented 3 years ago

Hi, in the project int8 calibration part DatasetCalibrator has mentioned buffer, can this buffer support multiple inputs as one input?

grimoire commented 3 years ago

Hi, Sorry for my late reply. Did you mean that your model has multiple inputs? The DatasetCalibrator should support multiple inputs if you provide the right dataset. If you meet any problem with it. Please share the error log here so I can provide further help.

0yueyunfei0 commented 3 years ago

Thank you for your reply. I have found that the most critical part of the get_batch method is to return the data pointer of the inputs,i took a different procedure than your get_batch procedure and just make sure that the data pointers(in my case it was two) to the inputs was returned, It seems that the calibration was successful