Reputation: 47
I have a question about summing two normal distribution in Keras. So, I have 2 normal distributions called epsilon_1 ~ N(0,stdev1²) and epsilon_2 ~ N(0,1 - stdev1²). If I want to sum those 2 normal distribution, is it correct if I only do this epsilon_1 + epsilon_2 in my code?
stddev1 = 0.25
epsilon_mean = 0
epsilon_std_1 = stddev1
epsilon_std_2 = 1 - stddev1
epsilon1 = K.random_normal(shape=(1, 100),mean=epsilon_mean, stddev=epsilon_std_1)
epsilon2 = K.random_normal(shape=(1, 100),mean=epsilon_mean, stddev=epsilon_std_2)
epsilon = epsilon1 + epsilon2
Upvotes: 0
Views: 139
Reputation: 175
your code is correct, and you can verify by checking the new mean and std of the new random variable, they should be equal to the sum of the originals respectively
Upvotes: 1