Open medric49 opened 1 year ago
Hi, @medric49
Apologize for the delayed response and I was able to replicate the same issue with same error which you mentioned above so we will have to dig more into this issue and we will update you soon, thank you for noticing this issue and I really appreciate your efforts and time. for your reference I have added screenshot below. Thank you!
gaikwadrahul-macbookpro:TFJS gaikwadrahul$ node test.js
============================
Hi, looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, visit https://github.com/tensorflow/tfjs-node for more details.
============================
/Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:3374
throw new Error("Cannot compute gradient: gradient function not found " +
^
Error: Cannot compute gradient: gradient function not found for NotEqual.
at _loop_1 (/Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:3374:19)
at backpropagateGradients (/Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:3411:9)
at /Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:5161:13
at /Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:4562:22
at Engine.scopedRun (/Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:4572:23)
at Engine.tidy (/Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:4561:21)
at Engine.gradients (/Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:5157:21)
at variableGrads (/Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:13670:21)
at Optimizer.computeGradients (/Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:23813:16)
at Optimizer.minimize (/Users/gaikwadrahul/Desktop/TFJS/node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:23765:23)
Node.js v18.15.0
gaikwadrahul-macbookpro:TFJS gaikwadrahul$
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.
System information
Describe the current behavior I am using
tf.losses.computeWeightedLoss
loss function in the .compile() method and I get the error message: Cannot compute gradient: gradient function not found for NotEqual. It seems it is not possible to compute the gradient of this loss function.Standalone code to reproduce the issue
Other info / logs