Turning a batch of images to a grid e.g. input shape: (36, 64, 64) Will be a grid of 6x6, each grid is an image size 64x64
(self, name, input_3d)
| 986 | self.img_grid(k, v) |
| 987 | |
| 988 | def img_grid(self, name, input_3d): |
| 989 | """ |
| 990 | Turning a batch of images to a grid |
| 991 | e.g. input shape: (36, 64, 64) |
| 992 | Will be a grid of 6x6, each grid is |
| 993 | an image size 64x64 |
| 994 | """ |
| 995 | self.img('key', tv.utils.make_grid( |
| 996 | input_3d.cpu().unsqueeze(1), pad_value=self.pad_value, nrow=self.nrow)) |
| 997 | |
| 998 | |
| 999 |