Part Number: AM68A
Hello,
I am trying the train a yolox_s_ti_lite model since the 4GB space for data in Edge AI Studio is not enough for me. I used this model from:
And after that, I used onnxruntime to generate .onnx file from the .pth file. I still need to compile it to get the artifacts.
For this, I used Jupyter notebook given in the model evaluator in the Edge-AI Studio. I followed the steps in notebooks/custom-model-onnx.ipynb
When I upload my .onnx, follow the steps and run this bit:
so = rt.SessionOptions()
EP_list = ['TIDLCompilationProvider','CPUExecutionProvider']
sess = rt.InferenceSession(onnx_model_path ,providers=EP_list, provider_options=[compile_options, {}], sess_options=so)
input_details = sess.get_inputs()
for num in tqdm.trange(len(calib_images)):
output = list(sess.run(None, {input_details[0].name : preprocess_for_onnx_resent18v2(calib_images[num])}))[0]
EP_list = ['TIDLCompilationProvider','CPUExecutionProvider']
sess = rt.InferenceSession(onnx_model_path ,providers=EP_list, provider_options=[compile_options, {}], sess_options=so)
input_details = sess.get_inputs()
for num in tqdm.trange(len(calib_images)):
output = list(sess.run(None, {input_details[0].name : preprocess_for_onnx_resent18v2(calib_images[num])}))[0]
-----------------------------
I get the error as;
--------------------------------------------------------------------------- Fail Traceback (most recent call last) <ipython-input-27-c8ebf5693570> in <module> 1 so = rt.SessionOptions() 2 EP_list = ['TIDLCompilationProvider','CPUExecutionProvider'] ----> 3 sess = rt.InferenceSession(onnx_model_path ,providers=EP_list, provider_options=[compile_options, {}], sess_options=so) 4 5 input_details = sess.get_inputs() /usr/local/lib/python3.6/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py in __init__(self, path_or_bytes, sess_options, providers, provider_options) 281 282 try: --> 283 self._create_inference_session(providers, provider_options) 284 except RuntimeError: 285 if self._enable_fallback: /usr/local/lib/python3.6/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py in _create_inference_session(self, providers, provider_options) 313 314 # initialize the C++ InferenceSession --> 315 sess.initialize_session(providers, provider_options) 316 317 self._sess = sess Fail: [ONNXRuntimeError] : 1 : FAIL : This is an invalid model. Error: the graph is not acyclic.
----------------------------------------------------
I am lost at what should I do at this point. Can you help? Do I have an easier way to generate the artifacts without having a linux pc?
Thanks,
Ibrahim