| 186 | # Test build model from Pretrained weights |
| 187 | |
| 188 | class CustomLinear(BaseModule): |
| 189 | |
| 190 | def __init__(self, init_cfg=None): |
| 191 | super().__init__(init_cfg) |
| 192 | self.linear = nn.Linear(1, 1) |
| 193 | |
| 194 | def init_weights(self): |
| 195 | constant_(self.linear.weight, 1) |
| 196 | constant_(self.linear.bias, 2) |
| 197 | |
| 198 | @FOOMODELS.register_module() |
| 199 | class PratrainedModel(FooModel): |
no outgoing calls
searching dependent graphs…