mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-11-02 02:41:00 +00:00
fixed plot_losses (#677)
This commit is contained in:
parent
3d4bce6d57
commit
e79bb50a1b
@ -228,7 +228,7 @@ if __name__ == "__main__":
|
||||
)
|
||||
|
||||
epochs_tensor = torch.linspace(0, args.n_epochs, len(train_losses))
|
||||
plot_losses(epochs_tensor, tokens_seen, train_losses, val_losses, output_dir)
|
||||
plot_losses(epochs_tensor, tokens_seen, train_losses, val_losses)
|
||||
|
||||
torch.save(model.state_dict(), output_dir / "model_pg_final.pth")
|
||||
print(f"Maximum GPU memory allocated: {torch.cuda.max_memory_allocated() / 1e9:.2f} GB")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user