(self, input, motion_mask=None, condition=None)
| 188 | self.final = nn.Linear(self.latent_dim, self.input_feats) |
| 189 | |
| 190 | def forward(self, input, motion_mask=None, condition=None): |
| 191 | B = input.shape[0] |
| 192 | T = self.max_seq_len |
| 193 | input = self.linear(input) |
| 194 | if self.use_condition: |
| 195 | if self.num_class is None: |
| 196 | condition = self.condition_bias(condition) |
| 197 | else: |
| 198 | condition = self.condition_bias[condition.long()].squeeze(1) |
| 199 | input = input + condition |
| 200 | query = self.pos_encoder.pe[:T, :].view(T, 1, -1).repeat(1, B, 1) |
| 201 | input = input.view(1, B, -1) |
| 202 | feature = self.seqTransDecoder( |
| 203 | tgt=query, |
| 204 | memory=input, |
| 205 | tgt_key_padding_mask=(1 - motion_mask).bool()) |
| 206 | pose = self.final(feature).permute(1, 0, 2).contiguous() |
| 207 | return pose |
nothing calls this directly
no outgoing calls
no test coverage detected