.. _op_ai_onnx_Mul-6: Mul - version 6 =============== This page documents version **6** of operator **Mul**. See :doc:`Mul` for the latest version (since version 14). - **Domain**: ``ai.onnx`` - **Since version**: 6 Performs element-wise binary multiplication (with limited broadcast support). If necessary the right-hand-side argument will be broadcasted to match the shape of left-hand-side argument. When broadcasting is specified, the second tensor can either be of element size 1 (including a scalar tensor and any tensor with rank equal to or smaller than the first tensor), or having its shape as a contiguous subset of the first tensor's shape. The starting of the mutually equal shape is specified by the argument "axis", and if it is not set, suffix matching is assumed. 1-dim expansion doesn't work yet. For example, the following tensor shapes are supported (with broadcast=1): .. code-block:: text shape(A) = (2, 3, 4, 5), shape(B) = (,), i.e. B is a scalar tensor shape(A) = (2, 3, 4, 5), shape(B) = (1, 1), i.e. B is an 1-element tensor shape(A) = (2, 3, 4, 5), shape(B) = (5,) shape(A) = (2, 3, 4, 5), shape(B) = (4, 5) shape(A) = (2, 3, 4, 5), shape(B) = (3, 4), with axis=1 shape(A) = (2, 3, 4, 5), shape(B) = (2), with axis=0 Attribute ``broadcast=1`` needs to be passed to enable broadcasting. **Inputs** - **A** (*T*): First operand, should share the type with the second operand. - **B** (*T*): Second operand. With broadcasting can be of smaller size than A. If broadcasting is disabled it should be of the same size. **Outputs** - **C** (*T*): Result, has same dimensions and type as A **Type Constraints** - **T**: Constrain input and output types to high-precision numeric tensors. Allowed types: tensor(double), tensor(float), tensor(float16), tensor(int32), tensor(int64), tensor(uint32), tensor(uint64). Differences with previous version (1) ------------------------------------- **SchemaDiff**: ``Mul`` (domain ``'ai.onnx'``) * old version: 1 * new version: 6 * breaking: no **Type constraints:** * changed 'T': added types: ['tensor(int32)', 'tensor(int64)', 'tensor(uint32)', 'tensor(uint64)']