import torch
from torch.utils.data import Dataset, DataLoader
from torch.utils.feature import ImageFolder

# Load MNIST dataset
data = ImageFolder("MNIST")

# Load MNIST model
model = torch.nn.nn.Sequential()
model.add(ImageFolder(data))

# Train the model
model.train()

# Test the model
test_data = torch.utils.data.DataLoader(
    dataset=model,
    batch_size=1024,
    shuffle=True,
    num_workers=2,
)

# Test the model
test_results = model(test_data)

# Print the results
print(test_results.cpu().numpy())
