MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / make_linear

Method make_linear

model/transformer_utils.py:131–136  ·  view source on GitHub ↗
(self, dim_in, dim_out, is_first, is_last, bias=True)

Source from the content-addressed store, hash-verified

129 return x
130
131 def make_linear(self, dim_in, dim_out, is_first, is_last, bias=True):
132 layer = nn.Linear(dim_in, dim_out, bias=bias)
133 nn.init.xavier_uniform_(layer.weight)
134 if bias:
135 nn.init.zeros_(layer.bias)
136 return layer
137
138 def make_activation(self, activation):
139 if activation is None:

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected