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

#875 Feature/sg 761 yolo nas

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-761-yolo-nas
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
  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. - variable_setup
  20. arch_params:
  21. num_classes: 10
  22. in_channels: 1
  23. dataset_params:
  24. train_dataset_params:
  25. root: ./data/mnist
  26. train: True
  27. transforms:
  28. - RandomHorizontalFlip
  29. - ToTensor
  30. target_transform: null
  31. download: True
  32. train_dataloader_params:
  33. dataset: Mnist
  34. batch_size: 256
  35. num_workers: 8
  36. drop_last: False
  37. pin_memory: True
  38. val_dataset_params:
  39. root: ./data/mnist
  40. train: False
  41. transforms:
  42. - ToTensor
  43. target_transform: null
  44. download: True
  45. val_dataloader_params:
  46. batch_size: 512
  47. num_workers: 8
  48. drop_last: False
  49. pin_memory: True
  50. resume: False
  51. training_hyperparams:
  52. resume: ${resume}
  53. max_epochs: 3
  54. architecture: mobilenet_v2
  55. experiment_name: mobilenet_v2_mnist
Discard
Tip!

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