You can either express these as convolutions with the stencils as weights (and number of groups=number of hannels) or do the slicing yourself e.g. dx = x[:,:,1:]-x[:,:,:-1]. This generally will give you the differences. To make them forward or backward, you would (zero-?) pad at the beginning or the end.
Best regards
Thomas