def forward(self, input):
       input,_ = input.sort(dim=1, descending=True)
       out = nn.functional.conv2d(input, self.weight, None, self.stride, self.padding, self.dilation, self.groups)

       return out

My concern is if above code of reordering input can affect to the calculation of the autograd gradients or are safe.
Thanks in advance!