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

regnetY800_example.py 911 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
18
19
20
21
22
23
24
25
26
27
28
29
  1. # Imagenet classification training:
  2. # For RegnetY800 => 76.1 accuracy
  3. # the hyper-parameters are tailored for training on Single 2080Ti GPU.
  4. import super_gradients
  5. from omegaconf import DictConfig
  6. import hydra
  7. import pkg_resources
  8. @hydra.main(config_path=pkg_resources.resource_filename("conf", ""), config_name="imagenet_regnetY800_conf")
  9. def train(cfg: DictConfig) -> None:
  10. # INSTANTIATE ALL OBJECTS IN CFG
  11. cfg = hydra.utils.instantiate(cfg)
  12. # CONNECT THE DATASET INTERFACE WITH DECI MODEL
  13. cfg.sg_model.connect_dataset_interface(cfg.dataset_interface, data_loader_num_workers=cfg.data_loader_num_workers)
  14. # BUILD NETWORK
  15. cfg.sg_model.build_model(cfg.architecture, arch_params=cfg.arch_params, load_checkpoint=cfg.load_checkpoint)
  16. # TRAIN
  17. cfg.sg_model.train(training_params=cfg.training_params)
  18. if __name__ == "__main__":
  19. super_gradients.init_trainer()
  20. train()
Tip!

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

Comments

Loading...