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

Function VecShape

tensorflow/core/kernels/random_op_test.cc:28–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace {
27
28Tensor VecShape(int64 v) {
29 if (v >= std::numeric_limits<int32>::max()) {
30 Tensor shape(DT_INT64, TensorShape({1}));
31 shape.vec<int64>()(0) = v;
32 return shape;
33 } else {
34 Tensor shape(DT_INT32, TensorShape({1}));
35 shape.vec<int32>()(0) = v;
36 return shape;
37 }
38}
39
40Graph* RandomUniform(int64 n) {
41 Graph* g = new Graph(OpRegistry::Global());

Callers 4

RandomUniformFunction · 0.70
RandomNormalFunction · 0.70
TruncatedNormalFunction · 0.70
BM_cpu_RandomGammaFunction · 0.70

Calls 2

maxFunction · 0.50
TensorShapeClass · 0.50

Tested by

no test coverage detected