Customize the backward function

Hello,
I am trying to customize a new module, I need to define the forward and backward function.
Do I need to divide the grad_weight by minibatch when I customize the backward function?