Abdullah-Nazhat
commited on
Update train.py
Browse files
train.py
CHANGED
@@ -176,9 +176,7 @@ epochs = 100
|
|
176 |
for epoch in range(epochs):
|
177 |
print(f"Epoch {epoch+1}\n-----------------------------------")
|
178 |
train_loss, train_acc = train(train_dataloader, model, loss_fn, optimizer)
|
179 |
-
|
180 |
-
#if scheduler is not None:
|
181 |
-
# scheduler.step()
|
182 |
test_loss, test_acc = test(test_dataloader, model, loss_fn)
|
183 |
with open(logname, 'a') as logfile:
|
184 |
logwriter = csv.writer(logfile, delimiter=',')
|
|
|
176 |
for epoch in range(epochs):
|
177 |
print(f"Epoch {epoch+1}\n-----------------------------------")
|
178 |
train_loss, train_acc = train(train_dataloader, model, loss_fn, optimizer)
|
179 |
+
|
|
|
|
|
180 |
test_loss, test_acc = test(test_dataloader, model, loss_fn)
|
181 |
with open(logname, 'a') as logfile:
|
182 |
logwriter = csv.writer(logfile, delimiter=',')
|