-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
support kldiv_loss/kldiv_loss_grad for kunlun #47638
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
88be535
to
5ff0d43
Compare
*test=kunlun
5ff0d43
to
d94a108
Compare
@@ -0,0 +1,147 @@ | |||
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. |
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.
改成 2022 ?
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.
OK
def setUp(self): | ||
self.initTestCase() | ||
self.op_type = 'kldiv_loss' | ||
self.dtype = np.float32 |
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.
使用 self.dtype = self.in_type 代替吧,方便op后续支持其他数据类型。
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.
OK
self.dtype = np.float32 | ||
self.__class__.use_xpu = True | ||
self.python_api = kl_div | ||
x = np.random.uniform(-10, 10, self.x_shape).astype('float32') |
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.
使用 .astype(self.dtype),下同。
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.
OK
你的PR已合入Paddle库,请关注后续测试结果。 |
PR types
Others
PR changes
Others
Describe
support kldiv_loss/kldiv_loss_grad for kunlun.