MCPcopy Create free account
hub / github.com/Monalissaa/DisenDiff / forward

Method forward

clip/model.py:156–159  ·  view source on GitHub ↗
(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

154 """Subclass torch's LayerNorm to handle fp16."""
155
156 def forward(self, x: torch.Tensor):
157 orig_type = x.dtype
158 ret = super().forward(x.type(torch.float32))
159 return ret.type(orig_type)
160
161
162class QuickGELU(nn.Module):

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected