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

Function CubeWithPow3

tensorflow/core/kernels/cwise_ops_test.cc:151–160  ·  view source on GitHub ↗

Three implementations of x^3.

Source from the content-addressed store, hash-verified

149
150// Three implementations of x^3.
151Graph* CubeWithPow3(int num) {
152 Graph* g = new Graph(OpRegistry::Global());
153 Tensor lhs(DT_FLOAT, TensorShape({64, 64, num / (64 * 64)}));
154 lhs.flat<float>().setRandom();
155 Tensor rhs(DT_FLOAT, TensorShape({}));
156 rhs.flat<float>().setConstant(3);
157 test::graph::Binary(g, "Pow", test::graph::Constant(g, lhs),
158 test::graph::Constant(g, rhs));
159 return g;
160}
161
162Graph* CubeWithTwoMuls(int num) {
163 Graph* g = new Graph(OpRegistry::Global());

Callers

nothing calls this directly

Calls 3

ConstantFunction · 0.70
TensorShapeClass · 0.50
BinaryFunction · 0.50

Tested by

no test coverage detected