MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / __init__

Method __init__

tests/test_functional.py:51–58  ·  view source on GitHub ↗
(self, input_features, hidden_size, bias=True)

Source from the content-addressed store, hash-verified

49
50class FFN(torch.nn.Module):
51 def __init__(self, input_features, hidden_size, bias=True):
52 super().__init__()
53 self.fc1 = torch.nn.Linear(input_features, hidden_size, bias=bias)
54 self.fc2 = torch.nn.Linear(hidden_size, input_features, bias=bias)
55
56 with torch.no_grad():
57 torch.nn.init.xavier_uniform_(self.fc1.weight)
58 torch.nn.init.xavier_uniform_(self.fc2.weight)
59
60 def forward(self, x):
61 x = torch.relu(self.fc1(x))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected