function fusedMatMul_({ a, b, transposeA = false, transposeB = false, bias, activation = "linear", preluActivationWeights, leakyreluAlpha = 0.2 }) {
    if ((0, _fusedUtil.shouldFuse)((0, _engine.ENGINE).state.gradientDepth, activation) === false) {
        let result = (0, _matMul.matMul)(a, b, transposeA, transposeB);
        if (bias != null) result = (0, _add.add)(result, bias);
        return (0, _fusedUtil.applyActivation)(result, activation, preluActivationWeights, leakyreluAlpha);
    }
    let $a = (0, _tensorUtilEnv.convertToTensor)(a, "a", "fused matMul");
    let $b = (0, _tensorUtilEnv.convertToTensor)(b, "b", "fused matMul");
    [$a, $b] = (0, _tensorUtil.makeTypesMatch)($a, $b);
    const innerShapeA = transposeA ? $a.shape[$a.rank - 2] : $a.shape[$a.rank - 1];
    const innerShapeB = transposeB ? $b.shape[$b.rank - 1] : $b.shape[$b.rank - 2];
    const outerShapeA = transposeA ? $a.shape[$a.rank - 1] : $a.shape[$a.rank - 2];
    const outerShapeB = transposeB ? $b.shape[$b.rank - 2] : $b.shape[$b.rank - 1];
    const outerDimsA = $a.shape.slice(0, -2);
    const outerDimsB = $b.shape.slice(0, -2);
    const batchDimA = _util.sizeFromShape(outerDimsA);
    const batchDimB = _util.sizeFromShape(outerDimsB);
    _util.assert(innerShapeA === innerShapeB, ()=>`Error in fused matMul: inner shapes (${innerShapeA}) and (` + `${innerShapeB}) of Tensors with shapes ${$a.shape} and ` + `${$b.shape} and transposeA=${transposeA}` + ` and transposeB=${transposeB} must match.`);
    const outShapeOuterDims = _broadcastUtil.assertAndGetBroadcastShape($a.shape.slice(0, -2), $b.shape.slice(0, -2));
    const outShape = outShapeOuterDims.concat([
        outerShapeA,
        outerShapeB
    ]);
    const a3D = transposeA ? (0, _reshape.reshape)($a, [
        batchDimA,
        innerShapeA,
        outerShapeA
    ]) : (0, _reshape.reshape)($a, [
        batchDimA,
        outerShapeA,
        innerShapeA
    ]);
    const b3D = transposeB ? (0, _reshape.reshape)($b, [
        batchDimB,
        outerShapeB,
        innerShapeB
    ]) : (0, _reshape.reshape)($b, [
        batchDimB,
        innerShapeB,
        outerShapeB
    ]);
    let $bias;
    if (bias != null) {
        $bias = (0, _tensorUtilEnv.convertToTensor)(bias, "bias", "fused matMul");
        [$bias] = (0, _tensorUtil.makeTypesMatch)($bias, $a);
        _broadcastUtil.assertAndGetBroadcastShape(outShape, $bias.shape);
    }
    let $preluActivationWeights;
    if (preluActivationWeights != null) $preluActivationWeights = (0, _tensorUtilEnv.convertToTensor)(preluActivationWeights, "prelu weights", "fused matMul");
    const grad = (dy, saved)=>{
        const [a3D, b3D, y, $bias] = saved;
        // we reshape dy because the result of the forward is not
        // necessarily going to be a 3d tensor due to a reshape done at the end of
        // the customOp.
        const dyActivation = (0, _fusedUtil.getFusedDyActivation)((0, _reshape.reshape)(dy, y.shape), y, activation);
        let aDer;
        let bDer;
        if (!transposeA && !transposeB) {
            aDer = (0, _matMul.matMul)(dyActivation, b3D, false, true);
            bDer = (0, _matMul.matMul)(a3D, dyActivation, true, false);
        } else if (!transposeA && transposeB) {
            aDer = (0, _matMul.matMul)(dyActivation, b3D, false, false);
            bDer = (0, _matMul.matMul)(dyActivation, a3D, true, false);
        } else if (transposeA && !transposeB) {
            aDer = (0, _matMul.matMul)(b3D, dyActivation, false, true);
            bDer = (0, _matMul.matMul)(a3D, dyActivation, false, false);
        } else {
            aDer = (0, _matMul.matMul)(b3D, dyActivation, true, true);
            bDer = (0, _matMul.matMul)(dyActivation, a3D, true, true);
        }
        if (bias != null) {
            const biasDer = (0, _fusedUtil.getFusedBiasGradient)($bias, dyActivation);
            return [
                aDer,
                bDer,
                biasDer
            ];
        } else return [
            aDer,
            bDer
        ];
    };
    const inputs = {
        a: a3D,
        b: b3D,
        bias: $bias,
        preluActivationWeights: $preluActivationWeights
    };
    const attrs = {
        transposeA,
        transposeB,
        activation,
        leakyreluAlpha
    };
    // Depending on the the params passed in we will have different number of
    // inputs and thus a a different number of elements in the gradient.
    if (bias == null) {
        const customOp = (0, _gradients.customGrad)((a3D, b3D, save)=>{
            const res = // tslint:disable-next-line: no-unnecessary-type-assertion
            (0, _engine.ENGINE).runKernel((0, _kernelNames._FusedMatMul), inputs, attrs);
            save([
                a3D,
                b3D,
                res
            ]);
            return {
                value: (0, _reshape.reshape)(res, outShape),
                gradFunc: grad
            };
        });
        return customOp(a3D, b3D);
    } else {
        const customOpWithBias = (0, _gradients.customGrad)((a3D, b3D, $bias, save)=>{
            const res = // tslint:disable-next-line: no-unnecessary-type-assertion
            (0, _engine.ENGINE).runKernel((0, _kernelNames._FusedMatMul), inputs, attrs);
            save([
                a3D,
                b3D,
                res,
                $bias
            ]);
            return {
                value: (0, _reshape.reshape)(res, outShape),
                gradFunc: grad
            };
        });
        return customOpWithBias(a3D, b3D, $bias);
    }
}
Computes the dot product of two matrices with optional activation and bias.

```js
const a = tf.tensor2d([-1, -2], [1, 2]);
const b = tf.tensor2d([1, 2, 3, 4], [2, 2]);
const bias = tf.tensor2d([1, 2], [1, 2]);

tf.fused.matMul({a, b, bias, activation: 'relu'}).print();
```

@param obj An object with the following properties:
- `a` First matrix in dot product operation.
- `b` Second matrix in dot product operation.
- `transposeA` If true, `a` is transposed before multiplication.
- `transposeB` If true, `b` is transposed before multiplication.
- `bias` Matrix to be added to the result.
- `activation` Name of activation kernel (defaults to `linear`).
- `preluActivationWeights` Tensor of prelu weights.
- `leakyreluAlpha` Alpha of leakyrelu.