As others have also suggested, if you get the above error detailing currently unsupported ops you have 2 options:


Contribute the missing op to the TensorFlow.js project - we are open source and welcome pull requests to help gain parity with TF Python  - there are thousands of ops out there so we have tried to convert over common ones initially but we are a younger team so may be some time before parity is achieved. Na Li wrote a nice document on contributing ops here: tfjs/CONTRIBUTING_MISSING_OP.md at master · tensorflow/tfjs · GitHub 2


Change the Python model not to use the unsupported op(s) so it uses ones we do support. However this can be hard as it is not immediately obvious what command in the high level code caused that op to be used unless you know the model very well and how the functions used translate to  lower level operations.


As you mentioned, we do have a Universal Sentence Encoder already converted available as a premade model: tfjs-models/universal-sentence-encoder at master · tensorflow/tfjs-models · GitHub 3 if this is good enough for your needs.