My project involves training an input of random uniformly distributed data using regression (this is my approach) to output random normally distributed data. The issue with formulating the problem is the loss function. I am struggling to implement a loss function which looks at each data input and output. I have considered using normality tests statistics within my loss function such as the Anderson Darling Statistic or the Kolmogorov Smirnov test but both of these assign a number for the whole dataset and not for each data point. Is there any way I could implement one of these normality test statistics within my loss function?