Is there any way we can save the model with the registered custom ops, so that each time when we load the onnx model we don't have to register the custom ops? Right now every time we load the model, we need to register the custom ops. Actually I need to deploy the model on onnxruntime server, currently what is happening is when I am deploying it on onnxruntime server, it is throwing [Load model from /location/to/the/onnx_model failed:Fatal error: StringRegexReplace is not a registered function/op]
And below is the code I have to use every time to register the custom op:
import onnx
import onnxruntime as ort
from onnxruntime import InferenceSession, SessionOptions
so = ort.SessionOptions()
so.register_custom_ops_library(get_library_path())
sess = ort.InferenceSession("model_name.onnx", so)
Is there any way we can save the model with the registered custom ops, so that each time when we load the onnx model we don't have to register the custom ops? Right now every time we load the model, we need to register the custom ops. Actually I need to deploy the model on onnxruntime server, currently what is happening is when I am deploying it on onnxruntime server, it is throwing
[Load model from /location/to/the/onnx_model failed:Fatal error: StringRegexReplace is not a registered function/op]
And below is the code I have to use every time to register the custom op: