Solved by Yaroslav_Bulatov in post #2 
              
              
                You can you look at your situation as finding derivative of f(g(h(w))), and the values you get are h’ = 1, g’=1/2 and f’=0 . Since this is composition, f’!=h’+g’ 
To see why specifically you get zero you can decorate your graph to print backward values 
import torch
import torch.nn as nn
import torc…