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

mobilenetv3_imagenet_example.py 1019 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
30
  1. # MobileNetV3 Large Imagenet classification training:
  2. # This example trains with batch_size = 128 * 2 GPUs, total 256.
  3. # Training time on 2 X GeForce RTX 2080 Ti is 19min / epoch, total time ~ 50 hours.
  4. # Reach 73.79 Top1 accuracy.
  5. # Training parameters are for MobileNet Large
  6. import super_gradients
  7. from omegaconf import DictConfig
  8. import hydra
  9. import pkg_resources
  10. @hydra.main(config_path=pkg_resources.resource_filename("conf", ""), config_name="imagenet_mobilenetv3_conf")
  11. def train(cfg: DictConfig) -> None:
  12. # INSTANTIATE ALL OBJECTS IN CFG
  13. cfg = hydra.utils.instantiate(cfg)
  14. # CONNECT THE DATASET INTERFACE WITH DECI MODEL
  15. cfg.sg_model.connect_dataset_interface(cfg.dataset_interface, data_loader_num_workers=cfg.data_loader_num_workers)
  16. # BUILD NETWORK
  17. cfg.sg_model.build_model(cfg.architecture, load_checkpoint=cfg.load_checkpoint)
  18. # TRAIN
  19. cfg.sg_model.train(training_params=cfg.training_params)
  20. if __name__ == "__main__":
  21. super_gradients.init_trainer()
  22. train()
Tip!

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

Comments

Loading...