Skip to content

Commit

Permalink
feat: Updated src/main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-nightly[bot] authored Nov 26, 2023
1 parent daebccc commit 129646e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def forward(self, x):

# Training loop
epochs = 3
epochs = 3
for epoch in range(epochs):
for images, labels in trainloader:
optimizer.zero_grad()
Expand All @@ -45,11 +44,4 @@ def forward(self, x):
loss.backward()
optimizer.step()

torch.save(model.state_dict(), "mnist_model.pth")

torch.save(model.state_dict(), "mnist_model.pth")
loss = criterion(output, labels)
loss.backward()
optimizer.step()

torch.save(model.state_dict(), "mnist_model.pth")

0 comments on commit 129646e

Please sign in to comment.