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

Function BinaryScalar

tensorflow/core/kernels/cwise_ops_test.cc:90–99  ·  view source on GitHub ↗

data func scalar.

Source from the content-addressed store, hash-verified

88
89// data func scalar.
90Graph* BinaryScalar(int num, const string& func) {
91 Graph* g = new Graph(OpRegistry::Global());
92 Tensor lhs(DT_FLOAT, TensorShape({64, 64, num / (64 * 64)}));
93 lhs.flat<float>().setRandom();
94 Tensor rhs(DT_FLOAT, TensorShape({}));
95 rhs.flat<float>().setRandom();
96 test::graph::Binary(g, func, test::graph::Constant(g, lhs),
97 test::graph::Constant(g, rhs));
98 return g;
99}
100
101#define BM_BINARY_SCALAR(DEVICE, FUNC) \
102 void BM_##DEVICE##_##FUNC##_scalar(int iters, int num) { \

Callers

nothing calls this directly

Calls 3

ConstantFunction · 0.70
TensorShapeClass · 0.50
BinaryFunction · 0.50

Tested by

no test coverage detected