| 144 | |
| 145 | template <typename Backend> |
| 146 | std::vector<py::tuple> py_shape_list(const TensorList<Backend> &tl) { |
| 147 | std::vector<py::tuple> ret(tl.shape().size()); |
| 148 | for (int i = 0; i < tl.shape().size(); ++i) { |
| 149 | ret[i] = py::tuple(as_py_list(tl.tensor_shape(i))); |
| 150 | } |
| 151 | return ret; |
| 152 | } |
| 153 | |
| 154 | static string TensorLayoutRepr(const TensorLayout &tl) { |
| 155 | std::stringstream ss; |
nothing calls this directly
no test coverage detected