Solved by ptrblck in post #2 
              
              
                If you are returning None gradients, you would detach the computation graph at this point and all preceding layers wouldn’t get any gradients, which could explain the issues you are seeing. 
In case you want to write a “no-op” numpy layer, you could pass on the gradients to the preceding layer.