Re: [theano-users] 'FromFunctionOp' object has no attribute 'grad'
I think scan need to compute all the grad internally, even if they don't get used. You could implement a grad method to the as_op that will add dummy op to the graph that could be removed later if they aren't needed. Check those 2 URLS: http://deeplearning.net/software/theano/extending/op.html?highlight=grad_not_implemented http://deeplearning.net/software/theano/library/gradient.html?highlight=grad_not_implemented#theano.gradient.grad_not_implemented There is a method grad_not_implemented that you can use inside the grad() function that you must build. On Sat, Sep 17, 2016 at 11:20 PM,wrote: > I have a function which resizes images in the 'scan' function,and I > implement the resize function by '@as_op' method,so how can I avoid this > error as I did not need to compute grad of my resize function .But it did > required one. > > 在 2016年9月15日星期四 UTC+8下午9:11:44,nouiz写道: >> >> Can you give the full error with stack trace? If Theano give this error >> it is probably because there is a path in the grad that request it. >> >> Le 14 sept. 2016 04:14, a écrit : >> >>> But my function does not need to calculate gradient,how can I fix this? >>> >>> -- >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "theano-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to theano-users...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > > --- > You received this message because you are subscribed to the Google Groups > "theano-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to theano-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [theano-users] 'FromFunctionOp' object has no attribute 'grad'
I have a function which resizes images in the 'scan' function,and I implement the resize function by '@as_op' method,so how can I avoid this error as I did not need to compute grad of my resize function .But it did required one. 在 2016年9月15日星期四 UTC+8下午9:11:44,nouiz写道: > > Can you give the full error with stack trace? If Theano give this error it > is probably because there is a path in the grad that request it. > > Le 14 sept. 2016 04:14,a écrit : > >> But my function does not need to calculate gradient,how can I fix this? >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "theano-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to theano-users...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [theano-users] 'FromFunctionOp' object has no attribute 'grad'
I have a function 'im_crop' in step function ,it generates labels online ,but it doesnot need to calculate grad,how can I do ? 在 2016年9月15日星期四 UTC+8下午9:11:44,nouiz写道: > > Can you give the full error with stack trace? If Theano give this error it > is probably because there is a path in the grad that request it. > > Le 14 sept. 2016 04:14,a écrit : > >> But my function does not need to calculate gradient,how can I fix this? >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "theano-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to theano-users...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.