You need to return as many values from backwards as were passed to to forward, this includes any non-tensor arguments (likeclip_low etc). For non-Tensor arguments that don’t have an input gradient you can return None but still need to return a value. So, as there were 5 inputs to forward, you need 5 outputs from backward. Technically, I gather if the user only passed input and left the others as default you could just return one gradient, but then you’d have to track that, instead you can also return extra Nones which will be ignored.
Explained in the docs on extending autograd 7.