Skip to content
Snippets Groups Projects
Commit 9d841cfe authored by Hashim Sharif's avatar Hashim Sharif
Browse files

Speeding up data dumping routine

parent e45db4b3
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ def dumpLabels(file_name, Y_test):
def dumpData(file_name, X_test):
"""def dumpData(file_name, X_test):
N = X_test.shape[0]
C = X_test.shape[1]
......@@ -46,7 +46,27 @@ def dumpData(file_name, X_test):
f.write(np.float32(val[0]))
f.close()
"""
def dumpData(file_name, X_test):
N = X_test.shape[0]
C = X_test.shape[1]
H = X_test.shape[2]
W = X_test.shape[3]
print ("*DumpData")
print("-min_val = ", np.amin(X_test))
print("-max_val = ", np.amax(X_test))
f = open(file_name, "wb")
X_test.tofile(f)
f.close()
def dumpConvWeights(file_name, weights, N, C, H, W):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment