MCPcopy Create free account
hub / github.com/MotrixLab/MotionDiffuse / forward

Method forward

text2motion/datasets/evaluator_models.py:172–184  ·  view source on GitHub ↗
(self, inputs, last_pred, hidden, p)

Source from the content-addressed store, hash-verified

170 return list(hidden)
171
172 def forward(self, inputs, last_pred, hidden, p):
173 h_in = self.emb(inputs)
174 pos_enc = self.positional_encoder(p).to(inputs.device).detach()
175 h_in = h_in + pos_enc
176 for i in range(self.n_layers):
177 # print(h_in.shape)
178 hidden[i] = self.gru[i](h_in, hidden[i])
179 h_in = hidden[i]
180 pose_pred = self.output(h_in)
181 # pose_pred = self.output(h_in) + last_pred.detach()
182 # contact = self.contact_net(pose_pred)
183 # return torch.cat([pose_pred, contact], dim=-1), hidden
184 return pose_pred, hidden
185
186
187class TextDecoder(nn.Module):

Callers

nothing calls this directly

Calls 1

toMethod · 0.80

Tested by

no test coverage detected