diff --git a/tutorials/source_en/debug/pynative.md b/tutorials/source_en/debug/pynative.md index cb29036564102198625490ca3bcf711fb995a2b0..7afc21f36ef3ec3a12b3cb68b25d47ae06ddce2e 100644 --- a/tutorials/source_en/debug/pynative.md +++ b/tutorials/source_en/debug/pynative.md @@ -175,7 +175,7 @@ When you need to see if the backpropagation accuracy is accurate under a dynamic return x net = Net() - output = mindspore.value_and_grad(net, grad_position=(0,1))(Tensor(np.ones([1]).astype(np.float32))) + output = mindspore.value_and_grad(net, grad_position=(0,))(Tensor(np.ones([1]).astype(np.float32))) print(output) ``` @@ -184,4 +184,4 @@ When you need to see if the backpropagation accuracy is accurate under a dynamic ## More Practical Examples -Refer to [debugging case](https://www.hiascend.com/developer/blog/details/0229108045633055169). \ No newline at end of file +Refer to [debugging case](https://www.hiascend.com/developer/blog/details/0229108045633055169). diff --git a/tutorials/source_zh_cn/debug/pynative.md b/tutorials/source_zh_cn/debug/pynative.md index 44ad0e059ae3df66134976be545731ce61c8fb90..60c44ffb542e73d201e25063721345d7b357b2f3 100644 --- a/tutorials/source_zh_cn/debug/pynative.md +++ b/tutorials/source_zh_cn/debug/pynative.md @@ -175,7 +175,7 @@ def some_function(): return x net = Net() - output = mindspore.value_and_grad(net, grad_position=(0,1))(Tensor(np.ones([1]).astype(np.float32))) + output = mindspore.value_and_grad(net, grad_position=(0,))(Tensor(np.ones([1]).astype(np.float32))) print(output) ``` @@ -184,4 +184,4 @@ def some_function(): ## 更多实际案例 -参考[调试案例](https://www.hiascend.com/developer/blog/details/0229108045633055169)。 \ No newline at end of file +参考[调试案例](https://www.hiascend.com/developer/blog/details/0229108045633055169)。