Learn preprocessing parameters and use them in dataloader

Hi all,

I try to implement a neural network, which also learns preprocessing parameters. The learnable parameters should be adapted based on the input and, therefore, the loading and preprocessing in the Dataloader need to use the parameters. Is there a fast and efficient way to share these parameters and update them during backprob?. Thank you in advance.