Write tensor in file format supported by TFLITE example.
(fp, x)
| 180 | """ |
| 181 | |
| 182 | def write_tensor(fp, x): |
| 183 | """Write tensor in file format supported by TFLITE example.""" |
| 184 | fp.write("dtype,%s\n" % x.dtype) |
| 185 | fp.write("shape," + ",".join(map(str, x.shape)) + "\n") |
| 186 | fp.write("values," + format_result(x) + "\n") |
| 187 | |
| 188 | fp.write("test_cases,%d\n" % len(examples)) |
| 189 | for example in examples: |
no test coverage detected