The Object Detection Finetuning Tutorial 51 might be a good starter for your use case.
In this tutorial the train_one_epoch 17 utility function is used, which takes care of the backward and update step.
However, you could of course look at the linked source code and apply these steps manually.