Three implementations of x^3.
| 149 | |
| 150 | // Three implementations of x^3. |
| 151 | Graph* 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 | |
| 162 | Graph* CubeWithTwoMuls(int num) { |
| 163 | Graph* g = new Graph(OpRegistry::Global()); |
nothing calls this directly
no test coverage detected