|
|
|
@ -72,23 +72,24 @@ The equation is:
|
|
|
|
|
|
|
|
|
|
$$%s$$
|
|
|
|
|
|
|
|
|
|
$X$ is a tensor of any dimension and the dimensions of tensor $Y$ must be
|
|
|
|
|
smaller than or equal to the dimensions of $X$.
|
|
|
|
|
$X$ is a tensor of any dimension. And $Y$ is a tensor whose dimensions must be
|
|
|
|
|
less than or equal to the dimensions of $X$.
|
|
|
|
|
|
|
|
|
|
There are two cases for this operator:
|
|
|
|
|
1. The shape of $Y$ is same with $X$;
|
|
|
|
|
2. The shape of $Y$ is a congiguous subsequencet of $X$. The trailing dimensions
|
|
|
|
|
of size 1 for $Y$ will be ignored for the consideration of subsequence.
|
|
|
|
|
|
|
|
|
|
1. The shape of $Y$ is the same with $X$.
|
|
|
|
|
2. The shape of $Y$ is a continuous subsequence of $X$.
|
|
|
|
|
|
|
|
|
|
For case 2:
|
|
|
|
|
|
|
|
|
|
$Y$ will be broadcasted to match the shape of $X$ and axis should be
|
|
|
|
|
set to index of the start dimension to broadcast $Y$ onto $X$.
|
|
|
|
|
1. Broadcast $Y$ to match the shape of $X$, where $axis$ is the start dimension index
|
|
|
|
|
for broadcasting $Y$ onto $X$.
|
|
|
|
|
2. If $axis$ is -1 (default), $axis = rank(X) - rank(Y)$.
|
|
|
|
|
3. The trailing dimensions of size 1 for $Y$ will be ignored for the consideration of
|
|
|
|
|
subsequence, such as shape(Y) = (2, 1) => (2).
|
|
|
|
|
|
|
|
|
|
If axis is -1, it is treated as axis=rank(X)-rank(Y).
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
|
|
For example
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
|
|
shape(X) = (2, 3, 4, 5), shape(Y) = (,)
|
|
|
|
@ -98,8 +99,8 @@ For example
|
|
|
|
|
shape(X) = (2, 3, 4, 5), shape(Y) = (2), with axis=0
|
|
|
|
|
shape(X) = (2, 3, 4, 5), shape(Y) = (2, 1), with axis=0
|
|
|
|
|
|
|
|
|
|
Either of the inputs $X$ and $Y$ or none can carry the LoD (Level of Details)
|
|
|
|
|
information. However, the output only shares the LoD information with input $X$.
|
|
|
|
|
The inputs $X$ and $Y$ can carry the different LoD information.
|
|
|
|
|
But the output only shares the LoD information with the input $X$.
|
|
|
|
|
|
|
|
|
|
)DOC",
|
|
|
|
|
GetName(), GetEquation()));
|
|
|
|
|