Skip to content

Instantly share code, notes, and snippets.

@oborchers
Created April 3, 2021 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oborchers/13f9b318570ad50ca0b701b1f2482d87 to your computer and use it in GitHub Desktop.
Save oborchers/13f9b318570ad50ca0b701b1f2482d87 to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir universal-sentence-encoder-5
cd universal-sentence-encoder-5
wget https://storage.googleapis.com/tfhub-modules/google/universal-sentence-encoder-large/5.tar.gz
tar -xvzf 5.tar.gz
rm 5.tar.gz
cd ..
python -m tf2onnx.convert --saved-model universal-sentence-encoder-5 --output universal-sentence-encoder-5.onnx --opset 12 --extra_opset ai.onnx.contrib:1 --tag serve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment