MCPcopy Create free account
hub / github.com/SHAILAB-IPEC/OpenFly-Platform / ls_apply_patch

Function ls_apply_patch

train/extern/hf/modeling_prismatic.py:57–60  ·  view source on GitHub ↗
(ls_module: LayerScale)

Source from the content-addressed store, hash-verified

55
56
57def ls_apply_patch(ls_module: LayerScale):
58 ls_module.scale_factor = nn.Parameter(ls_module.gamma.clone())
59 ls_module.forward = _ls_new_forward.__get__(ls_module, LayerScale)
60 del ls_module.gamma
61
62
63# === Prismatic Vision Backbone (nn.Module) Definitions (w/ Fused Backbone Support) ===

Callers 1

__init__Method · 0.85

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected