Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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