Created
April 3, 2021 15:39
-
-
Save oborchers/6fa59eb782b610f3fc460391c2c7a8fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from onnxruntime import InferenceSession, SessionOptions | |
from onnxruntime_customops import get_library_path | |
opt = rt.SessionOptions() | |
opt.register_custom_ops_library(get_library_path()) | |
sess = rt.InferenceSession("universal-sentence-encoder-5.onnx", opt, providers=ONNX_PROVIDERS) | |
sess.run( | |
output_names=["outputs"], | |
input_feed={"inputs:0": [span]}, | |
)[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment