Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stevemclaugh/c5ad22ead3ead111be71ad363990ecad to your computer and use it in GitHub Desktop.
Save stevemclaugh/c5ad22ead3ead111be71ad363990ecad to your computer and use it in GitHub Desktop.
import mnist
import numpy as np
x_train, y_train, x_data, y_data = mnist.load()
x_filtered = []
y_filtered = []
for i in range(len(x_data)):
x_temp = x_data[i]
y_temp = y_data[i]
if y_temp > 6 or y_temp == 5 or y_temp == 1:
x_filtered.append(x_temp)
y_filtered.append(y_temp)
x_filtered = np.array(x_filtered)
y_filtered = np.array(y_filtered)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment