提交 a22ff6eb authored 作者: Frederic Bastien's avatar Frederic Bastien

added assert for better error msg.

上级 927c4c02
......@@ -1402,6 +1402,8 @@ class MaxAndArgmax(Op):
axis = x.type.ndim - 1
if isinstance(axis,int):
axis = [axis]
elif isinstance(axis,(tuple,list)):
assert len(axis)==1,"MaxAndArgmax don't support multiple axis. the max fct support it."
#we make the axis all positive to make the infer_shape work with negative axis
if x.type.ndim>0:
for id,a in enumerate(axis):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论