MCPcopy Create free account
hub / github.com/open-mmlab/mmengine / ExampleModel

Class ExampleModel

tests/test_optim/test_optimizer/test_optimizer.py:65–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64
65class ExampleModel(nn.Module):
66
67 def __init__(self):
68 super().__init__()
69 self.param1 = nn.Parameter(torch.ones(1))
70 self.conv1 = nn.Conv2d(3, 4, kernel_size=1, bias=False)
71 self.conv2 = nn.Conv2d(4, 2, kernel_size=1)
72 self.bn = nn.BatchNorm2d(2)
73 self.sub = SubModel()
74 if MMCV_FULL_AVAILABLE:
75 from mmcv.ops import DeformConv2dPack
76 self.dcn = DeformConv2dPack(
77 3, 4, kernel_size=3, deformable_groups=1)
78
79
80class ExampleDuplicateModel(nn.Module):

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…