运行结果尺寸: 625 x 565
x
 
<!DOCTYPE html>
<html>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<body>
<h2>JavaScript</h2>
<p>Creating a tensor with tensorflow.js</p>
<div id="demo"></div>
<script>
const tensorA = tf.tensor([[1, 2], [3, 4], [5, 6]]);
document.getElementById("demo").innerHTML = tensorA;
</script>
</body>
</html>