AI, better than 60 percent bro PLEASE
This commit is contained in:
@@ -417,8 +417,6 @@ def main():
|
||||
|
||||
# Training loop
|
||||
best_acc = 0.0
|
||||
patience = 15
|
||||
wait = 0
|
||||
epochs = 60
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
@@ -473,7 +471,6 @@ def main():
|
||||
# Save best model
|
||||
if test_acc > best_acc:
|
||||
best_acc = test_acc
|
||||
wait = 0
|
||||
torch.save({
|
||||
'model': model.state_dict(),
|
||||
'optimizer': optimizer.state_dict(),
|
||||
@@ -488,13 +485,8 @@ def main():
|
||||
}, "best_asl_transformer.pth")
|
||||
print(f" → New best: {best_acc:.2f}% ✓")
|
||||
else:
|
||||
wait += 1
|
||||
print()
|
||||
|
||||
if wait >= patience:
|
||||
print(f"\nEarly stopping triggered at epoch {epoch + 1}")
|
||||
break
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print(f"✓ Training complete!")
|
||||
print(f"✓ Best test accuracy: {best_acc:.2f}%")
|
||||
|
||||
Reference in New Issue
Block a user