提交 2070aaae 编写于 作者: M Megvii Engine Team

fix(mge/functional): fix duplicate `transpose` in `__all__` and add `dimshuffle

GitOrigin-RevId: 29670882338fd43d4c91519e1acaaa6e454bb992
上级 6ce796ae
......@@ -37,8 +37,7 @@ __all__ = [
"broadcast",
"concat",
"cond_take",
"transpose",
"add_axis",
"dimshuffle",
"eye",
"flatten",
"full",
......@@ -732,7 +731,10 @@ def transpose(inp: Tensor, pattern: Iterable[int]) -> Tensor:
return inp.transpose(pattern)
dimshuffle = transpose
def dimshuffle(inp: Tensor, pattern: Iterable[int]) -> Tensor:
r"""Same as :func:`~.transpose`.
"""
return transpose(inp, pattern)
def reshape(inp: Tensor, target_shape: Iterable[int]) -> Tensor:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册