nn-Meter icon indicating copy to clipboard operation
nn-Meter copied to clipboard

How to use PyTorch or TensorFlow to check the predicted value

Open Sniper1-love opened this issue 11 months ago • 1 comments

Thank you very much for opening up such a dataset. However, I want to ask a question. I can use meter.predictor to predict the inference latency about "id": "resnet34_350"(a example) And then, I want to check whether the prediction value is corrected. So I want to run resnet34_350 using PyTorch. But How can I make the structure of resnet34_350 "{"input_im_0": {"inbounds": [], "attr": {"name": "input_im_0", "type": "Placeholded······" used in Pytorch code. I will be very appreciate that you can answer my question.

Sniper1-love avatar Mar 05 '24 09:03 Sniper1-love

Thank you for raising this issue. Actually the conversion from PyTorch model to nn-Meter IR is unidirectional. As a result, it’s not possible to automatically generate Python code or ONNX model from nn-Meter IR. However, you can manually perform the conversion from the PyTorch model to nn-Meter IR and afterwards compare the results to ensure their consistency.

JiahangXu avatar Mar 05 '24 10:03 JiahangXu