mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 07:28:15 -05:00
Add return statement to the train function (#1135)
add a return statement to the train function in order to provide access to the losses and accuracies lists
This commit is contained in:
@@ -40,6 +40,7 @@ def train(model, X_train, Y_train, optim, steps, BS=128, lossfn=sparse_categoric
|
||||
losses.append(loss)
|
||||
accuracies.append(accuracy)
|
||||
t.set_description("loss %.2f accuracy %.2f" % (loss, accuracy))
|
||||
return [losses, accuracies]
|
||||
|
||||
|
||||
def evaluate(model, X_test, Y_test, num_classes=None, BS=128, return_predict=False, transform=lambda x: x,
|
||||
|
||||
Reference in New Issue
Block a user