No, it's the loss function we differentiate. The input to the loss function are the network weights. The input to the network are samples and those we do not differentiate.
(You might have intended to say this, in which cases I'm just trying to add clarity.)