Skip to content

Commit

Permalink
Sandbox run src/cnn.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-nightly[bot] authored Nov 27, 2023
1 parent 7cfe902 commit 53a51f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ def train_cnn(self, trainloader, epochs=3):

torch.save(self.state_dict(), "mnist_cnn_model.pth")

transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.5,), (0.5,))
])

trainset = datasets.MNIST('.', download=True, train=True, transform=transform)
transform = transforms.Compose(
[transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))]
)

trainset = datasets.MNIST(".", download=True, train=True, transform=transform)
trainloader = DataLoader(trainset, batch_size=64, shuffle=True)

cnn = CNN()
Expand Down

0 comments on commit 53a51f8

Please sign in to comment.