zamroni111 commited on
Commit
6e510b3
·
verified ·
1 Parent(s): 5502e45

Upload 2 files

Browse files
Files changed (1) hide show
  1. dml-device-specific-optim.py +5 -2
dml-device-specific-optim.py CHANGED
@@ -3,10 +3,13 @@ import onnxruntime as rt
3
  sess_options = rt.SessionOptions()
4
  sess_options.graph_optimization_level = rt.GraphOptimizationLevel.ORT_ENABLE_ALL
5
 
6
- ###################################################
7
- #########Change the Path Accordingly###############
8
  sess_options.optimized_model_filepath = "d:/tmp/optimized_model.onnx"
9
 
 
 
 
10
  session = rt.InferenceSession("model.onnx" , sess_options,
11
  ###providers=['xxxxxxxxxDmlExecutionProvider', 'CPUExecutionProvider'])
12
  providers=['DmlExecutionProvider'])
 
3
  sess_options = rt.SessionOptions()
4
  sess_options.graph_optimization_level = rt.GraphOptimizationLevel.ORT_ENABLE_ALL
5
 
6
+ #########################################
7
+ ## Change the Path Accordingly
8
  sess_options.optimized_model_filepath = "d:/tmp/optimized_model.onnx"
9
 
10
+
11
+ #########################################
12
+ ## Change the model.onnx path accordingly
13
  session = rt.InferenceSession("model.onnx" , sess_options,
14
  ###providers=['xxxxxxxxxDmlExecutionProvider', 'CPUExecutionProvider'])
15
  providers=['DmlExecutionProvider'])