Paddle Unit test for `lookup_table` OP with SelectedRows in grad.

Paddle PaddlePaddle-Gardener 2022年3月22日 21:08 65 查看原文

源自github用户arogowie-intel: I've added support for BF16 data type in PR, however I can't find a way to test the grad calculations with "W" input as SelectedRows. Does this part of code checks also grad? Could you advise how to test grad calculations with "W" input as SelectedRows ?

回答
1 条回答

源自github用户zhangting2020: The code you refer to only checks the forward result and it does not check the grad. There is no function to automatically calculate the theoretical gradient in our unit test framework.

You can try to implement the theoretical gradient calculation yourself in the unit test, and compare it with the actual value calculated by the operator.

热门问题
相关推荐
推荐分类