MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TruncatedNormal

Function TruncatedNormal

tensorflow/compiler/tf2xla/lib/random.cc:29–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace tensorflow {
28
29xla::XlaOp TruncatedNormal(xla::XlaOp uniform) {
30 const double kA = -2.0;
31 const double kB = 2.0;
32 const double kMu = 0.0;
33 const double kSigma = 1.0;
34 return ParameterizedTruncatedNormal(
35 uniform, xla::ScalarLike(uniform, kMu), xla::ScalarLike(uniform, kSigma),
36 xla::ScalarLike(uniform, kA), xla::ScalarLike(uniform, kB));
37}
38
39// Implements the sampling of truncated normal distribution using the
40// inversed cumulative distribution function (CDF) method as described in

Callers 3

CompileMethod · 0.50
CompileMethod · 0.50
CompileMethod · 0.50

Calls 2

ScalarLikeFunction · 0.85

Tested by

no test coverage detected