If I were to custom define gradient for eq and not eq, along with logical_or(), logical_gt(), how would I do that? can you point me to some example/tutorial for this? Im fairly new to pytorch.
I am thinking just to pass along the gradient if equal, and reduce gradient to 0 if not equal.
same with gt, if value is greater than cmpared_value, pass along the gradient; otherwise reduce to 0
and for logical_or(), I’ll add the gradient together, e.g. True + True
Thanks.