(self, batch, batch_idx, dataloader_idx=0)
| 204 | return preds, targets |
| 205 | |
| 206 | def predict_step(self, batch, batch_idx, dataloader_idx=0): |
| 207 | if self.use_metadata == True: |
| 208 | logits = self.forward(batch["img"], batch["mtd"]) |
| 209 | else: |
| 210 | logits = self.forward(batch["img"], '') |
| 211 | proba = torch.softmax(logits, dim=1) |
| 212 | batch["preds"] = torch.argmax(proba, dim=1) |
| 213 | return batch |
| 214 | |
| 215 |