I have a matrix of mean values M and a matrix of standard deviations D, both of same size. I want to sample a matrix of random normal values A, such that the entry A[i,j] follows a normal distribution with mean M[i,j] and standard deviation D[i,j].
From the documentation (https://www.tensorflow.org/api_docs/python/tf/random/normal?version=stable) I see that tf.random.normal only takes scalar mean and standard deviation.
I know I can write a loop and sample each element. But I think this will be slow.
Is there a better way of doing what I want?
Aucun commentaire:
Enregistrer un commentaire