(path)
| 31 | return chw |
| 32 | |
| 33 | def load_tensor(path): |
| 34 | with open(path + ".shape") as f: |
| 35 | shape = [int(x) for x in f.read().strip().split(",") if x] |
| 36 | data = np.fromfile(path + ".bin", dtype=np.float32) |
| 37 | return data.reshape(shape) |
| 38 | |
| 39 | if __name__ == "__main__": |
| 40 | ref_dir = sys.argv[1] if len(sys.argv) > 1 else "tests/ref_phase3" |
no outgoing calls
no test coverage detected