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

#970 Update YoloNASQuickstart.md

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:bugfix/SG-000_fix_readme_yolonas_snippets
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. class IllegalRangeForLossAttributeException(Exception):
  2. """
  3. Exception raised illegal value (i.e not in range) for _Loss attribute.
  4. :param range_vals: Range of valid values
  5. :param attr_name: Name of attribute that is not in range
  6. """
  7. def __init__(self, range_vals: tuple, attr_name: str):
  8. self.message = attr_name + " must be in range " + str(range_vals)
  9. super().__init__(self.message)
  10. class RequiredLossComponentReductionException(Exception):
  11. """
  12. Exception raised illegal reduction for _Loss component.
  13. :param component_name: Name of component
  14. :param reduction: Reduction provided
  15. :param required_reduction: Reduction required
  16. """
  17. def __init__(self, component_name: str, reduction: str, required_reduction: str):
  18. self.message = component_name + ".reduction must be " + required_reduction + ", got" + reduction
  19. super().__init__(self.message)
Discard
Tip!

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