minor updates
Browse files
app.py
CHANGED
@@ -33,10 +33,13 @@ def load_model(model: str, activation: bool=True):
|
|
33 |
if activation:
|
34 |
model += '_w_activation'
|
35 |
|
|
|
36 |
options = ort.SessionOptions()
|
37 |
options.intra_op_num_threads = 1
|
38 |
options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
|
39 |
provider = "CPUExecutionProvider"
|
|
|
|
|
40 |
ort_session = ort.InferenceSession(model_path + '%s.onnx' % (model), options, providers=[provider])
|
41 |
# ort_session = ORTModel.load_model(model_path + '%s.onnx' % (model))
|
42 |
|
|
|
33 |
if activation:
|
34 |
model += '_w_activation'
|
35 |
|
36 |
+
# set options for onnx runtime
|
37 |
options = ort.SessionOptions()
|
38 |
options.intra_op_num_threads = 1
|
39 |
options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
|
40 |
provider = "CPUExecutionProvider"
|
41 |
+
|
42 |
+
# start session
|
43 |
ort_session = ort.InferenceSession(model_path + '%s.onnx' % (model), options, providers=[provider])
|
44 |
# ort_session = ORTModel.load_model(model_path + '%s.onnx' % (model))
|
45 |
|