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

#643 PPYolo-E

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-344-PP-Yolo-E-Training-Replicate-Recipe
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  1. # The purpose of the example below is to demonstrate the use of registry for external objects for training.
  2. # - We train mobilenet_v2 on a user dataset which is not defined in ALL_DATASETS using the dataloader registry.
  3. # - We leverage predefined configs from cifar_10 training recipe in our repo.
  4. #
  5. # In order for the registry to work, we must trigger the registry of the user's objects by importing their module at
  6. # the top of the training script. Hence, we created a similar script to our classic train_from_recipe but with the imports
  7. # on top. Once imported, all the registry decorated objects will be resolved (i.e user_mnist_train will be resolved
  8. # to the dataloader of our user's)
  9. #
  10. # Differently from user_recipe_mnist_example, here we demonstrate how to use train_from_recipe, without the need to implement a DataLoader class for registry.
  11. # Instead- we work straight with the user defined datasets, which is the simpler option when one does not need their own DataLoader implementation.
  12. # We do so by Dropping the train_datalaoder, valid_dataloader fields from the recipe's config, while specifying the dataset arg in
  13. # train_dataloader_params, valid_dataloader_params.
  14. defaults:
  15. - training_hyperparams: cifar10_resnet_train_params
  16. - dataset_params: cifar10_dataset_params
  17. - checkpoint_params: default_checkpoint_params
  18. - _self_
  19. arch_params:
  20. num_classes: 10
  21. in_channels: 1
  22. dataset_params:
  23. train_dataset_params:
  24. root: ./data/mnist
  25. train: True
  26. transforms:
  27. - RandomHorizontalFlip
  28. - ToTensor
  29. target_transform: null
  30. download: True
  31. train_dataloader_params:
  32. dataset: Mnist
  33. batch_size: 256
  34. num_workers: 8
  35. drop_last: False
  36. pin_memory: True
  37. val_dataset_params:
  38. root: ./data/mnist
  39. train: False
  40. transforms:
  41. - ToTensor
  42. target_transform: null
  43. download: True
  44. val_dataloader_params:
  45. batch_size: 512
  46. num_workers: 8
  47. drop_last: False
  48. pin_memory: True
  49. resume: False
  50. training_hyperparams:
  51. resume: ${resume}
  52. max_epochs: 3
  53. ckpt_root_dir:
  54. architecture: mobilenet_v2
  55. experiment_name: mobilenet_v2_mnist
  56. # THE FOLLOWING PARAMS ARE DIRECTLY USED BY HYDRA
  57. hydra:
  58. run:
  59. # Set the output directory (i.e. where .hydra folder that logs all the input params will be generated)
  60. dir: ${hydra_output_dir:${ckpt_root_dir}, ${experiment_name}}
Discard
Tip!

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