Bad advice in README for the TFJS version of the Universal Sentence Encoder?

Reading https://github.com/tensorflow/tfjs-models/tree/master/universal-sentence-encoder the sample code needs to compute the dot product of two tensors and it uses arraySync on the tensors, nested for loops, and JavaScript defined vector operations. Wouldn’t it be better practice to use tf.layers.dot? The code would be much more concise and presumably much faster. (If it is the case the sample code predated tf.layers.dot then shouldn’t it be updated?

Also would it not help the potential users of USE QnA to provide some information about why use this instead of just using the generic USE. Is it faster? More accurate? Smaller?

Thanks for raising the question Ken, have you submitted this as an issue on Github using this link: Sign in to GitHub · GitHub ?

That way it can be assigned to someone on the team to take a look into this matter. Thank you for helping to ensure everything is up to date and the best it can be though, it is very much appreciated.

PS in relation to why this version of USE - I believe this is the version that works best within the web environment - it is a lite version of the larger model AFAIK (based on the page title and opening paragraph) so performance should be better in the browser.

Thanks. Done. Bad advice in README for the TFJS version of the Universal Sentence Encoder · Issue #5931 · tensorflow/tfjs · GitHub

Wonderful thank you Ken!