(self, batch)
| 142 | self.load_pretrained(init_cfg['checkpoint']) |
| 143 | |
| 144 | def compute_loss(self, batch): |
| 145 | losses = {} |
| 146 | losses["total"] = 0 |
| 147 | |
| 148 | # compute clip losses |
| 149 | batch = self.encode_text(batch) |
| 150 | batch = self.encode_motion(batch) |
| 151 | |
| 152 | mixed_clip_loss, clip_losses = self.compute_clip_losses(batch) |
| 153 | losses.update(clip_losses) |
| 154 | losses["total"] += mixed_clip_loss |
| 155 | |
| 156 | return losses["total"], losses |
| 157 | |
| 158 | def generate_src_mask(self, T, length): |
| 159 | B = length.shape[0] |
nothing calls this directly
no test coverage detected