I am running USE in webworker and it is running fine.
I am trying to pass model to webworker. The reason behind this is that each time a webworker runs it downloads a new model. While passing model in post message following error is displayed:
Failed to execute 'postMessage' on 'Worker': function t(t,n){return e.apply(this,arguments)} could not be cloned.
Tried to serialize the model and pass it but model has circular dependency so it cannot be serialized.
Is there any alternate method to pass model to web worker?
The goal behind passing model is to improve the execution time of the embed function of the USE
question from:
https://stackoverflow.com/questions/65843033/tensorflow-js-universal-sentence-encoder-in-webworker 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…