Solved by colesbury in post #2 
              
              
                Your backward won’t be called because you return the original input ‘inp’. (This is changed in 0.3, but until then return inp.clone())
Your backward takes in too many arguments. It should only take in grad_out because the forward only returns a single argument.
Your backward returns too many values…