MCPcopy Create free account
hub / github.com/NineAbyss/ZeroG / __init__

Method __init__

code/utils.py:263–271  ·  view source on GitHub ↗
(self, input_dim: int, target_dim: int)

Source from the content-addressed store, hash-verified

261
262class ProjectHead(nn.Module):
263 def __init__(self, input_dim: int, target_dim: int) -> None:
264 super().__init__()
265
266 self.input_dim = input_dim
267 self.target_dim = target_dim
268
269 self.linear1 = nn.Linear(input_dim, target_dim)
270 self.linear2 = nn.Linear(target_dim, target_dim)
271 self.norm = nn.LayerNorm(target_dim)
272
273 def forward(self, x: torch.Tensor) -> torch.Tensor:
274 x = self.linear1(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected