function dot_(t1, t2) {
    const $t1 = (0, _tensorUtilEnv.convertToTensor)(t1, "t1", "dot");
    const $t2 = (0, _tensorUtilEnv.convertToTensor)(t2, "t2", "dot");
    _util.assert(($t1.rank === 1 || $t1.rank === 2) && ($t2.rank === 1 || $t2.rank === 2), ()=>`Error in dot: inputs must all be rank 1 or 2, but got ranks ` + `${$t1.rank} and ${$t2.rank}.`);
    const t1Inner = $t1.rank === 1 ? $t1.size : $t1.shape[1];
    const t2Inner = $t2.rank === 1 ? $t2.size : $t2.shape[0];
    _util.assert(t1Inner === t2Inner, ()=>`Error in dot: inner dimensions of inputs must match, but got ` + `${t1Inner} and ${t2Inner}.`);
    if ($t1.rank === 1 && $t2.rank === 1) {
        const t12D = (0, _reshape.reshape)($t1, [
            1,
            -1
        ]);
        const t22D = (0, _reshape.reshape)($t2, [
            -1,
            1
        ]);
        const t1t2 = (0, _matMul.matMul)(t12D, t22D);
        return (0, _reshape.reshape)(t1t2, []);
    } else if ($t1.rank === 1 && $t2.rank === 2) {
        const t12D = (0, _reshape.reshape)($t1, [
            1,
            -1
        ]);
        const t22D = (0, _reshape.reshape)($t2, [
            $t2.shape[0],
            $t2.shape[1]
        ]);
        const t1t2 = (0, _matMul.matMul)(t12D, t22D);
        return (0, _reshape.reshape)(t1t2, [
            t1t2.size
        ]);
    } else if ($t1.rank === 2 && $t2.rank === 1) {
        const t22D = (0, _reshape.reshape)($t2, [
            -1,
            1
        ]);
        const t1t2 = (0, _matMul.matMul)($t1, t22D);
        return (0, _reshape.reshape)(t1t2, [
            t1t2.size
        ]);
    } else {
        const t22D = (0, _reshape.reshape)($t2, [
            $t2.shape[0],
            $t2.shape[1]
        ]);
        const t1t2 = (0, _matMul.matMul)($t1, t22D);
        return t1t2;
    }
}
Computes the dot product of two matrices and/or vectors, `t1` and `t2`.

```js
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();
```
@param t1 The first tensor in the dot operation.
@param t2 The second tensor in the dot operation.

@doc {heading: 'Operations', subheading: 'Matrices'}