MCPcopy Create free account
hub / github.com/MotrixLab/FineMoGen / __init__

Method __init__

mogen/models/rnns/t2m_bigru.py:233–250  ·  view source on GitHub ↗
(self, input_size, hidden_size, output_size)

Source from the content-addressed store, hash-verified

231class MotionEncoderBiGRUCo(nn.Module):
232
233 def __init__(self, input_size, hidden_size, output_size):
234 super(MotionEncoderBiGRUCo, self).__init__()
235
236 self.input_emb = nn.Linear(input_size, hidden_size)
237 self.gru = nn.GRU(hidden_size,
238 hidden_size,
239 batch_first=True,
240 bidirectional=True)
241 self.output_net = nn.Sequential(
242 nn.Linear(hidden_size * 2, hidden_size), nn.LayerNorm(hidden_size),
243 nn.LeakyReLU(0.2, inplace=True), nn.Linear(hidden_size,
244 output_size))
245
246 self.input_emb.apply(init_weight)
247 self.output_net.apply(init_weight)
248 self.hidden_size = hidden_size
249 self.hidden = nn.Parameter(
250 torch.randn((2, 1, self.hidden_size), requires_grad=True))
251
252 # input(batch_size, seq_len, dim)
253 def forward(self, inputs, m_lens):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected