MCPcopy Create free account
hub / github.com/GeWu-Lab/AnyTouch2 / ffn_residual_func

Method ffn_residual_func

model/layers/decoder_block.py:111–112  ·  view source on GitHub ↗
(q: Tensor)

Source from the content-addressed store, hash-verified

109 return self.ls2(self.cross_attn(self.q_norm2(q), self.kv_norm2(kv)))
110
111 def ffn_residual_func(q: Tensor) -> Tensor:
112 return self.ls3(self.mlp(self.norm3(q)))
113
114 if self.training and self.sample_drop_ratio > 0.1:
115 # the overhead is compensated only for a drop path rate larger than 0.1

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected