ArtificialIntelligenceTensorFlowAPIOperationsMatricestf.dot本页总览tf.dot2025年02月10日柏拉文越努力,越幸运 一、认识 tf.dot 是 TensorFlow.js 中用于计算计算两个矩阵或向量 t1 和 t2 的点积。 二、语法 const a = tf.tensor1d([1, 2]);const b = tf.tensor2d([[1, 2], [3, 4]]);const c = tf.tensor2d([[1, 2, 3], [4, 5, 6]]);a.dot(b).print(); // or tf.dot(a, b)b.dot(a).print();b.dot(c).print();