function sub_(a, b) {
    let $a = (0, _tensorUtilEnv.convertToTensor)(a, "a", "sub");
    let $b = (0, _tensorUtilEnv.convertToTensor)(b, "b", "sub");
    [$a, $b] = (0, _tensorUtil.makeTypesMatch)($a, $b);
    const inputs = {
        a: $a,
        b: $b
    };
    return (0, _engine.ENGINE).runKernel((0, _kernelNames.Sub), inputs);
}
Subtracts two `tf.Tensor`s element-wise, A - B. Supports broadcasting.

```js
const a = tf.tensor1d([10, 20, 30, 40]);
const b = tf.tensor1d([1, 2, 3, 4]);

a.sub(b).print();  // or tf.sub(a, b)
```

```js
// Broadcast subtract a with b.
const a = tf.tensor1d([10, 20, 30, 40]);
const b = tf.scalar(5);

a.sub(b).print();  // or tf.sub(a, b)
```
@param a The first `tf.Tensor` to subtract from.
@param b The second `tf.Tensor` to be subtracted. Must have the same dtype as
`a`.

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