Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

checkpoint.py 344 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  1. import logging
  2. from pathlib import Path
  3. from warnings import warn
  4. from pytorch_lightning.callbacks import ModelCheckpoint
  5. logger = logging.getLogger(__name__)
  6. # default used by the Trainer
  7. checkpoint_callback = ModelCheckpoint(
  8. dirpath=Path().cwd(),
  9. save_last=True,
  10. verbose=True,
  11. monitor="val/total_loss",
  12. mode="min",
  13. )
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...