change vjp to paddle.grad (#41231)
* change vjp to paddle.grad
* use grad and gradients api
* fix preprocess for x
* fix a bug, val_and_grad should return a Tensor
* detach value and grad to avoid assign error
Co-authored-by: Nlevi131 <limaolin01@baidu.com>
Showing
想要评论请 注册 或 登录