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

Class FakeDDP

tests/test_model/test_base_module.py:225–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 self.assertTrue((ori_layer_bias != model.linear.linear.bias).any())
224
225 class FakeDDP(nn.Module):
226
227 def __init__(self, module) -> None:
228 super().__init__()
229 self.module = module
230
231 # Test initialization of nested modules in DDPModule which define
232 # `init_weights`.

Callers 1

test_init_weightsMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_init_weightsMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…