dmlc / minpy

NumPy interface with mixed backend execution
https://minpy.readthedocs.io/en/latest/
Other
1.11k stars 112 forks source link

How to specify a function's gradient function defined by users just like 'Autograd' ? #178

Closed sjr113 closed 7 years ago

sjr113 commented 7 years ago

As we know, there are some functions that need user specify their gradient sometimes. In 'Autograd' package, we can use '@primitive' to declare that the gradient of one function has been specified instead of solving its grad automatically. So I wonder how to implement this operation in 'Minpy'?

hotpxl commented 7 years ago

Please refer to this tutorial https://minpy.readthedocs.io/en/latest/feature/customop.html

sjr113 commented 7 years ago

Thanks very much...my problem has been solved with the help of this tutorial ^_^

sjr113 commented 7 years ago

Thanks for your quick reply~ My problem has been solved with the help of this tutorial~ thanks so much for your kind help~

Best wishes

11521050@zju.edu.cn

From: Yutian Li Date: 2017-05-03 14:57 To: dmlc/minpy CC: Jiangrong Shen; Author Subject: Re: [dmlc/minpy] How to specify a function's gradient function defined by users just like 'Autograd' ? (#178) Please refer to this tutorial https://minpy.readthedocs.io/en/latest/feature/customop.html — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.