nn-Meter
nn-Meter copied to clipboard
How to use PyTorch or TensorFlow to check the predicted value
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.
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.