MCPcopy
hub / github.com/borisdayma/dalle-mini / norm

Function norm

src/dalle_mini/model/modeling.py:178–184  ·  view source on GitHub ↗
(type, *args, **kwargs)

Source from the content-addressed store, hash-verified

176
177
178def norm(type, *args, **kwargs):
179 if type == "rmsnorm":
180 return RMSNorm(*args, **kwargs)
181 elif type == "layernorm":
182 return nn.LayerNorm(*args, **kwargs)
183 else:
184 raise ValueError(f"Unknown norm type {type}")
185
186
187def dot_product_attention_weights(

Callers 6

__call__Method · 0.70
__call__Method · 0.70
__call__Method · 0.70
__call__Method · 0.70
setupMethod · 0.70
setupMethod · 0.70

Calls 1

RMSNormClass · 0.85

Tested by

no test coverage detected