Convert a pytorch tensor to a numpy image
(images)
| 81 | |
| 82 | @staticmethod |
| 83 | def pt_to_numpy(images): |
| 84 | """ |
| 85 | Convert a pytorch tensor to a numpy image |
| 86 | """ |
| 87 | images = images.cpu().permute(0, 2, 3, 1).float().numpy() |
| 88 | return images |
| 89 | |
| 90 | @staticmethod |
| 91 | def normalize(images): |