Run ❯
zig
.
com
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script> <body> <h2>JavaScript</h2> <p>Multiplying tensors with tensorflow.js</p> <div id="demo"></div> <script> const tensorA = tf.tensor([1, 2, 3, 4]); const tensorB = tf.tensor([4, 4, 2, 2]); // Tensor Multiplication const tensorNew = tensorA.mul(tensorB); // Result: [ 4, 8, 6, 8 ] document.getElementById("demo").innerHTML = tensorNew; </script> </body> <!-- /ai/tryit.asp?filename=tryai_tensor_multiply by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 06 Feb 2025 18:50:36 GMT --> </html>