Solved by albanD in post #2 
              
              
                Hi, 
The difference is that in the first case, you have a single Function in the computational graph: LinearFunction, and so the backward will just call the backward for that Function. 
In the second case, the computational graph contain few Functions: mm, transpose, addition, unsqueeze, expand…  Th…