Open easypinex opened 4 years ago
I'm having a similar problem but within a react environment.
TypeError: ht(...).registerTensor is not a function
at new t (ml5.min.js:18)
at Function.t.make (ml5.min.js:18)
at yn (ml5.min.js:18)
at bn (ml5.min.js:18)
at i (ml5.min.js:18)
at Object.yl [as decodeWeights] (ml5.min.js:18)
at t.<anonymous> (ml5.min.js:72)
at ml5.min.js:72
at Object.next (ml5.min.js:72)
at a (ml5.min.js:72)
@easypinex were you able to find a solution? If not, what did you end up doing? I was thinking of switching to a different library if need to
I'm not resolve it... I detect If loaded other js , window.reload() ... :(
I built my project based on the Angular framework (8 or 9) , and import both tensorflow.js and ml5.js simultaneously.
I created two pages (component) for each package.
It looks fine if I import package A and only viewed one page.
But when I load another page (which using different js package ),
it would show some errors.
Is there any suggestion to make them work normally, even if the page return?
project src tree
tensor.componet.ts:
ml5.component.ts:
And I try to open the pages as follow sequences:
tensorflow.js(work) -> ml5(crashed)
ml5(work)-> tensorflow.js (crashed)
You can also refer demo about the project as following:
https://codesandbox.io/s/gallant-fermi-7thb6
ml5(work) -> tensorflow.js(crash):
tensorflow.js(work) -> ml5(crash):
My environment :
Angular 9
tensorflow.js:1.7.1
ml5.js:0.5.0
PS.
At first I thought the version of tensorflow.js was conflict,
But even if I downgrade the tensorflow.js version to 1.2.11 (tfjs.tfjs-core.tfjs-data) same as ml5, it couldn't solve this problem.