mirror of
https://github.com/JDAI-CV/fast-reid.git
synced 2025-06-02 22:29:29 +08:00
Summary: move div255 to gpu add read/write numpy ndarray, which will make the comparison between torch and trt results more easily. Reviewed By: l1aoxingyu
19 lines
333 B
Python
19 lines
333 B
Python
#!/usr/bin/env python
|
|
|
|
import sys
|
|
from numpy import savez
|
|
from scipy.io import loadmat
|
|
|
|
assert len(sys.argv) > 1
|
|
|
|
files = sys.argv[1:]
|
|
|
|
for f in files:
|
|
mat_vars = loadmat(f)
|
|
mat_vars.pop('__version__')
|
|
mat_vars.pop('__header__')
|
|
mat_vars.pop('__globals__')
|
|
|
|
fn = f.replace('.mat','.npz')
|
|
savez(fn,**mat_vars)
|