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

#817 Added tutorial on DetectionOutputAdapter

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-744_DetectionOutputAdapter_Docs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  1. import unittest
  2. import torch
  3. from super_gradients.modules import RepVGGBlock
  4. class TestRepVGGBlock(unittest.TestCase):
  5. def test_dilation_padding(self):
  6. in_channels = 16
  7. out_channels = 27
  8. feature_map = torch.randn((4, in_channels, 256, 256))
  9. block = RepVGGBlock(in_channels=feature_map.size(1), out_channels=out_channels, dilation=4)
  10. outputs = block(feature_map)
  11. self.assertEqual(outputs.size(1), out_channels)
  12. self.assertEqual(outputs.size(2), feature_map.size(2))
  13. self.assertEqual(outputs.size(3), feature_map.size(3))
  14. if __name__ == "__main__":
  15. unittest.main()
Discard
Tip!

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