MCPcopy
hub / github.com/google-deepmind/gemma / MyModule

Class MyModule

gemma/peft/_interceptors_test.py:44–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43
44class MyModule(nn.Module):
45
46 @nn.compact
47 def __call__(self, x):
48 # Call a same model twice
49 model = nn.Dense(1)
50 y0 = nn.Dropout(0.5, deterministic=False)(x)
51 y1 = model(x)
52 y2 = model(x)
53
54 # Call another model
55 y3 = nn.Dense(2)(x)
56 return {
57 'y0': y0,
58 'y1': y1,
59 'y2': y2,
60 'y3': y3,
61 }
62
63
64def test_module():

Callers 2

test_moduleFunction · 0.70

Calls

no outgoing calls

Tested by 2

test_moduleFunction · 0.56