Hi,
I have enrolled different courses and worked with some of the popular frameworks and it seems it is all about conventions. And the most used one is the method pytorch uses.
By the way, Andrew Ng uses same convetion has been used in PyTorch in computer vision and deep learning courses he instruct in Stanford university.
Good luck