question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Universal Sentence Encoder Model runs very slow after embedding large datasets

See original GitHub issue

TensorFlow.js version 2.0.1

Node Version 12.18.0

OS Windows 7

Prerequisite: yarn add @tensorflow/tfjs @tensorflow/tfjs-node @tensorflow-models/universal-sentence-encoder

Steps to Reproduce:

  1. Download and unzip debug use model.zip
  2. Run node checktime.js and note down the time taken to execute
  3. Run node embedlargedata.js, this script will embed large amount of data using universal sentence encoder model (takes around 1 hr)
  4. Run node checktime.js and note down the time taken to execute You will observe that after embedding large amount of data, the universal sentence encoder model will run very slow even for small datasets.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
annxingyuancommented, Jun 25, 2020

@pyu10055 I think the issue is that on the benchmark page we get the USE output data as part of the predict function, which is unlike all our other models (so the benchmarking script’s tensor cleanup mechanism fails to apply to the USE). I sent a fix here: https://github.com/tensorflow/tfjs/pull/3510

0reactions
google-ml-butler[bot]commented, Aug 14, 2020

Are you satisfied with the resolution of your issue? Yes No

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Universal Sentence Encoder tensorflowjs optimize ...
The time taken to create embeddings is too large as I need to create embedding for more than 1000 sentences which takes around...
Read more >
tensorflow hub Universal Sentence Encoder prediction kept ...
As I generate more batches, it's getting slower to predict embedding. I was wondering if there a better way to do this?
Read more >
Experiments Using Universal Sentence Encoder Embeddings ...
Running this model with equivalent speed to the DAN, assuming perfect linear speedup, would require 340 cores. ACCURACY. Given the enormous ...
Read more >
Common issues | TensorFlow Hub
Often this is a problem specific to the machine running the code and not an issue with the library. Here is a list...
Read more >
Universal Sentence Encoder - Google Research
We present models for encoding sentences into embedding vectors that specifically target transfer learning to other NLP tasks. The models are efficient and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found