!31038 fix miss x definition in test case

Merge pull request !31038 from xychow/fix-test-case-m
This commit is contained in:
i-robot 2022-03-10 03:45:23 +00:00 committed by Gitee
commit 5ee246e07c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 0 deletions

View File

@ -155,6 +155,8 @@ def test_reftoembed_with_two_weights():
output = self.grad(self.network, self.params)(x)
return output
context.set_context(mode=context.GRAPH_MODE)
x = Tensor([5], mstype.int32)
expected_weight_grad = Tensor([15], mstype.int32)
expected_bias_grad = Tensor([10], mstype.int32)
net = Net()