tensorflow / tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.
https://js.tensorflow.org
Apache License 2.0
18.52k stars 1.94k forks source link

Error: Kernel 'Transform' not registered for backend 'tensorflow' #6050

Closed jeffcrouse closed 2 years ago

jeffcrouse commented 2 years ago

System information

Describe the current behavior script exits with error:

(node:16000) UnhandledPromiseRejectionWarning: Error: Kernel 'Transform' not registered for backend 'tensorflow'
    at Engine.runKernel (C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow\tfjs-core\dist\tf-core.node.js:4503:19)
    at transform_ (C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow\tfjs-core\dist\tf-core.node.js:23094:19)
    at Object.transform__op [as transform] (C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow\tfjs-core\dist\tf-core.node.js:5456:29)
    at C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow-models\pose-detection\dist\calculators\convert_image_to_tensor.js:42:41
    at C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow\tfjs-core\dist\tf-core.node.js:4431:22
    at Engine.scopedRun (C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow\tfjs-core\dist\tf-core.node.js:4441:23)
    at Engine.tidy (C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow\tfjs-core\dist\tf-core.node.js:4430:21)
    at Object.tidy (C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow\tfjs-core\dist\tf-core.node.js:10478:19)
    at Object.convertImageToTensor (C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow-models\pose-detection\dist\calculators\convert_image_to_tensor.js:39:26)
    at BlazePoseTfjsDetector.<anonymous> (C:\Users\jeff\Desktop\tfjs_test\node_modules\@tensorflow-models\pose-detection\dist\blazepose_tfjs\detector.js:220:56)

Describe the expected behavior Script should successfully return poses

Standalone code to reproduce the issue https://gist.github.com/jeffcrouse/54a511ab938839472f7201e287761ed6

Other info / logs I can get the MoveNet and BodyPix examples to work just fine. Only BlazePose fails.

Thank you!

pyu10055 commented 2 years ago

@jeffcrouse unfortunately the transform op is a TFJS op, that is not available in tfjs-node. cc @lina128

okyksl commented 2 years ago

I have the same issue with PoseNet. Is transform op in plans for tfjs-node?