(self, output)
| 370 | self.velFinal = nn.Linear(self.latent_dim, self.input_feats) |
| 371 | |
| 372 | def forward(self, output): |
| 373 | nframes, bs, d = output.shape |
| 374 | if self.data_rep in ['rot6d', 'xyz', 'hml_vec']: |
| 375 | output = self.poseFinal(output) # [seqlen, bs, 150] |
| 376 | elif self.data_rep == 'rot_vel': |
| 377 | first_pose = output[[0]] # [1, bs, d] |
| 378 | first_pose = self.poseFinal(first_pose) # [1, bs, 150] |
| 379 | vel = output[1:] # [seqlen-1, bs, d] |
| 380 | vel = self.velFinal(vel) # [seqlen-1, bs, 150] |
| 381 | output = torch.cat((first_pose, vel), axis=0) # [seqlen, bs, 150] |
| 382 | else: |
| 383 | raise ValueError |
| 384 | output = output.reshape(nframes, bs, self.njoints, self.nfeats) |
| 385 | output = output.permute(1, 2, 3, 0) # [bs, njoints, nfeats, nframes] |
| 386 | return output |
| 387 | |
| 388 | |
| 389 | class EmbedAction(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected