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

imagenet_repvgg_example.py 764 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
  1. import super_gradients
  2. from omegaconf import DictConfig
  3. import hydra
  4. import pkg_resources
  5. @hydra.main(config_path=pkg_resources.resource_filename("conf", ""), config_name="imagenet_repvgg_conf")
  6. def train(cfg: DictConfig) -> None:
  7. # INSTANTIATE ALL OBJECTS IN CFG
  8. cfg = hydra.utils.instantiate(cfg)
  9. # CONNECT THE DATASET INTERFACE WITH DECI MODEL
  10. cfg.sg_model.connect_dataset_interface(cfg.dataset_interface, data_loader_num_workers=cfg.data_loader_num_workers)
  11. # BUILD NETWORK
  12. cfg.sg_model.build_model(cfg.architecture, arch_params=cfg.arch_params, load_checkpoint=cfg.load_checkpoint)
  13. # TRAIN
  14. cfg.sg_model.train(training_params=cfg.training_params)
  15. if __name__ == "__main__":
  16. super_gradients.init_trainer()
  17. train()
Tip!

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

Comments

Loading...