MCPcopy Create free account
hub / github.com/openai/point-e / __init__

Method __init__

point_e/models/transformer.py:52–59  ·  view source on GitHub ↗
(self, *, device: torch.device, dtype: torch.dtype, width: int, init_scale: float)

Source from the content-addressed store, hash-verified

50
51class MLP(nn.Module):
52 def __init__(self, *, device: torch.device, dtype: torch.dtype, width: int, init_scale: float):
53 super().__init__()
54 self.width = width
55 self.c_fc = nn.Linear(width, width * 4, device=device, dtype=dtype)
56 self.c_proj = nn.Linear(width * 4, width, device=device, dtype=dtype)
57 self.gelu = nn.GELU()
58 init_linear(self.c_fc, init_scale)
59 init_linear(self.c_proj, init_scale)
60
61 def forward(self, x):
62 return self.c_proj(self.gelu(self.c_fc(x)))

Callers 9

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

init_linearFunction · 0.85

Tested by

no test coverage detected