-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
转换规则 No.272/282/318/324/326 #149
Conversation
Thanks for your contribution! |
解决下冲突 |
已修改 |
paconvert/api_matcher.py
Outdated
class TensorHistogramMatcher(BaseMatcher): | ||
def generate_code(self, kwargs): | ||
if "range" in kwargs: | ||
r = eval(kwargs["range"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还是不要在这里执行了,如果range是个变量就会挂,风险比较大,建议在代码里可以直接写成:
kwargs["min"] = "{}[0]".format(kwargs["range"])
kwargs["max"] = "{}[1]".format(kwargs["range"])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,参数需要转整形增加int()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR Docs
#112
已有文档增加转换规则
282 torch.frexp 已存在测试,取消文件
PR APIs