Hi,
If you look at the function in the first example, you can see that the mv operation is actually done in the backend with the more general addmv function (which adds a constant to the output). This is where this extra (2,3) Variable comes from.
In the second graph, you can see all the internals of how the Linear layer is implemented. Here the addmm functions is used, and so here again you see an extra Variable being used for the add part.
In both cases, these are buffers that contain 0 and so won’t change the gradients in any way.