(path)
| 4 | import sys |
| 5 | |
| 6 | def load_tensor(path): |
| 7 | with open(path + ".shape") as f: |
| 8 | shape = [int(x) for x in f.read().strip().split(",")] |
| 9 | with open(path + ".bin", "rb") as f: |
| 10 | data = np.frombuffer(f.read(), dtype=np.float32).copy() |
| 11 | return data.reshape(shape) |
| 12 | |
| 13 | ref_dir = sys.argv[1] if len(sys.argv) > 1 else "tests/ref_phase3" |
| 14 |
no outgoing calls
no test coverage detected