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

Method make_activation

model/transformer_utils.py:138–150  ·  view source on GitHub ↗
(self, activation)

Source from the content-addressed store, hash-verified

136 return layer
137
138 def make_activation(self, activation):
139 if activation is None:
140 return nn.Identity()
141 if activation == "relu":
142 return nn.ReLU(inplace=True)
143 elif activation == "silu":
144 return nn.SiLU(inplace=True)
145 elif activation == "gelu":
146 return GELU_()
147 elif activation == "tanh":
148 return nn.Tanh()
149 else:
150 raise NotImplementedError
151
152class MultiHeadAttention(nn.Module):
153 """

Callers 1

__init__Method · 0.95

Calls 1

GELU_Class · 0.85

Tested by

no test coverage detected