(self, motion, motion_length, motion_mask)
| 88 | self.motion_encoder.load_state_dict(checkpoint['motion_encoder']) |
| 89 | |
| 90 | def forward(self, motion, motion_length, motion_mask): |
| 91 | motion = motion.detach().float() |
| 92 | sort_idx = np.argsort(motion_length.data.tolist())[::-1].copy() |
| 93 | rank_idx = np.empty_like(sort_idx) |
| 94 | rank_idx[sort_idx] = np.arange(len(motion_length)) |
| 95 | motion = motion[sort_idx] |
| 96 | motion_length = motion_length[sort_idx] |
| 97 | |
| 98 | movements = self.movement_encoder(motion[..., :-4]).detach() |
| 99 | m_lens = motion_length // 4 |
| 100 | motion_embedding = self.motion_encoder(movements, m_lens) |
| 101 | motion_embedding_ordered = motion_embedding[rank_idx] |
| 102 | return motion_embedding_ordered |
| 103 | |
| 104 | |
| 105 | @SUBMODULES.register_module() |
nothing calls this directly
no outgoing calls
no test coverage detected