MCPcopy Create free account
hub / github.com/FunAudioLLM/SenseVoice / __init__

Method __init__

model.py:61–67  ·  view source on GitHub ↗

Construct an PositionwiseFeedForward object.

(self, idim, hidden_units, dropout_rate, activation=torch.nn.ReLU())

Source from the content-addressed store, hash-verified

59 """
60
61 def __init__(self, idim, hidden_units, dropout_rate, activation=torch.nn.ReLU()):
62 """Construct an PositionwiseFeedForward object."""
63 super(PositionwiseFeedForward, self).__init__()
64 self.w_1 = torch.nn.Linear(idim, hidden_units)
65 self.w_2 = torch.nn.Linear(hidden_units, idim)
66 self.dropout = torch.nn.Dropout(dropout_rate)
67 self.activation = activation
68
69 def forward(self, x):
70 """Forward function."""

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected