mirror of
https://github.com/aladdinpersson/Machine-Learning-Collection.git
synced 2026-02-20 13:50:41 +00:00
small revisions to code examples
This commit is contained in:
@@ -130,7 +130,6 @@ for epoch in range(num_epochs):
|
|||||||
# gradient descent update step/adam step
|
# gradient descent update step/adam step
|
||||||
optimizer.step()
|
optimizer.step()
|
||||||
|
|
||||||
|
|
||||||
# Check accuracy on training & test to see how good our model
|
# Check accuracy on training & test to see how good our model
|
||||||
def check_accuracy(loader, model):
|
def check_accuracy(loader, model):
|
||||||
num_correct = 0
|
num_correct = 0
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ for epoch in range(num_epochs):
|
|||||||
# gradient descent or adam step
|
# gradient descent or adam step
|
||||||
optimizer.step()
|
optimizer.step()
|
||||||
|
|
||||||
|
|
||||||
# Check accuracy on training & test to see how good our model
|
# Check accuracy on training & test to see how good our model
|
||||||
def check_accuracy(loader, model):
|
def check_accuracy(loader, model):
|
||||||
num_correct = 0
|
num_correct = 0
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ for epoch in range(num_epochs):
|
|||||||
optimizer.step()
|
optimizer.step()
|
||||||
|
|
||||||
|
|
||||||
# Check accuracy on training & test to see how good our model is
|
# Check accuracy on training & test to see how good our model
|
||||||
def check_accuracy(loader, model):
|
def check_accuracy(loader, model):
|
||||||
num_correct = 0
|
num_correct = 0
|
||||||
num_samples = 0
|
num_samples = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user