diff --git a/tutorials/source_en/debug/pynative.md b/tutorials/source_en/debug/pynative.md index d2ffdf07a29bb892ba31ca737b69605c6f1c05d0..1a987cade2cdc734a865c20257da3b0e13d34883 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 26c1e5d5a661f259951905bd2aed7857fc606f8e..35e37d9b1459127cfc3885ad0c44aee85c745828 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)。