zamroni111's picture
Upload 2 files
63650f4 verified
raw
history blame
498 Bytes
import onnxruntime as rt
sess_options = rt.SessionOptions()
sess_options.graph_optimization_level = rt.GraphOptimizationLevel.ORT_ENABLE_ALL
###################################################
#########Change the Path Accordingly###############
sess_options.optimized_model_filepath = "d:/tmp/optimized_model.onnx"
session = rt.InferenceSession("model.onnx" , sess_options,
###providers=['xxxxxxxxxDmlExecutionProvider', 'CPUExecutionProvider'])
providers=['DmlExecutionProvider'])