Thank you so much! zero elements create nan grad in powbackward is exactly the cause. Your explanation really helps me fully understand this deg pow operation in my design scenario. Thank you again, thought this is my first post, I have read a lot of your responses in the forum, from which I learn a lot.