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

Function VecAlphas

tensorflow/core/kernels/random_op_test.cc:76–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74BM_RNG(gpu, TruncatedNormal);
75
76Tensor VecAlphas(int64 n) {
77 Tensor alphas(DT_DOUBLE, TensorShape({n}));
78 for (int i = 0; i < n; i++) {
79 // Alternate back and forth between small-and-growing (.25) and
80 // large-and-shrinking (26.67) alpha.
81 alphas.vec<double>()(i) =
82 0.25 + MathUtil::IPow(1.1, i % 2 == 0 ? i : n - i);
83 }
84 return alphas;
85}
86
87void BM_cpu_RandomGamma(int iters, int nsamp, int nalpha) {
88 testing::ItemsProcessed(static_cast<int64>(iters) * nsamp * nalpha);

Callers 1

BM_cpu_RandomGammaFunction · 0.85

Calls 1

TensorShapeClass · 0.50

Tested by

no test coverage detected