Closed LibrarristShalinward closed 1 year ago
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ,Github Issue and AI community to get the answer.Have a nice day!
版本、环境信息: 1)PaddlePaddle版本:2.1 2)CPU/GPU:CPU 3)系统环境:Win10 4)Python版本号:Python 3.8.1
复现论文:Cream of the Crop: Distilling Prioritized Paths For One-Shot Neural Architecture Search
问题描述:我需要在用paddle.grad()计算模型参数的梯度后进行计算,并将结果强行设置为原模型参数的梯度。目前我尝试通过直接设置的语句来解决,但代码会出现如下报错:
同时,由于需要使用grad中的grad_ouputs参数,导致上述计算过程无法通过backward方法替代
因此,我希望获得一个尽可能简便的、能够手动强行设置模型参数grad的代码实现方案