Created by: sandyhouse
PR types
Function optimization
PR changes
APIs
Describe
adaptive expand op to use shape instead of expand_times (align to torch.expand)
This operation tiles x
to a given shape defined by the parameter shape
.
The rank of x
should be less than or equal to 6. The dimension size to expand must be 1.
Input(X) is a 3-D tensor with shape [2, 3, 1]:
[
[[1], [2], [3]],
[[4], [5], [6]]
]
Attr(shape): [2, 6, 2]
Output(Out) is a 3-D tensor with shape [2, 6, 2]:
[
[[1, 1], [2, 2], [3, 3], [1, 1], [2, 2], [3, 3]],
[[4, 4], [5, 5], [6, 6], [4, 4], [5, 5], [6, 6]]
]