Created
July 9, 2018 12:52
-
-
Save siakon89/c1c2ffbaeadd0918c2043f4187a3eb84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the test data | |
def open_test_data(path): | |
test = [] | |
with open(path, 'r') as f: | |
reader = csv.reader(f) | |
lines = list(reader) | |
image_number = 1 | |
for line in tqdm(lines[1:]): | |
image = np.array([x for x in line]) | |
image = image.astype('float32') | |
image = np.reshape(image, (28, 28, 1)) | |
test.append([image, image_number]) | |
image_number += 1 | |
return np.array(test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment