(path)
| 41 | |
| 42 | |
| 43 | def load_tensor(path): |
| 44 | with open(path + ".shape") as f: |
| 45 | shape = [int(x) for x in f.read().strip().split(",") if x] |
| 46 | data = np.fromfile(path + ".bin", dtype=np.float32) |
| 47 | return data, shape |
| 48 | |
| 49 | |
| 50 | def compare(name, ref_path, cpp_path): |