the so-called truncated normal distribution is based on the standard normal distribution (Gaussian distribution) on the basis of the limit, so that the generated data in a certain range. For example, the data generated by the standard normal distribution are negative infinity to positive infinity, but the data generated by the truncated normal distribution is within this range (standard deviation of mean-twice times, mean + twice times standard deviation).
Import TensorFlow as tf
c = tf.truncated_normal (shape=[12,10], mean=100, stddev=1) with
TF. Session () as Sess:
print (Sess.run (c))
Output Result:
[[ 99.91983795 98.71269226 99.35746002 101.02975464 100.63500977]
[101.92388153 99.10471344 99.77385712 100.06600952 99.75480652]
[ 99.94233704 100.22845459 99.16555023 101.3265686 99.82016754]
[100.27728271 99.2677002 100.80665588 99.7434845 100.93345642]
[ 99.00519562 100.91706848 100.16968536 99.20123291 99.35009766]
[ 98.85636902 100.11727142 100.32691193 100.59256744 99.72653961]
[ 99.51020813 98.99095917 99.38573456 99.34537506 100.68587494]
[ 99.56321716 99.81674194 100.38961029 100.29162598 98.17160034]
[101.67827606 101.01641083 100.11600494 100.59056091 99.62102509]
[ 98.12446594 99.39179993 99.95746613 99.32868195 100.14764404]]
Where mean is the mean and StdDev is the variance