(tensor, title=None)
| 127 | plt.ion() |
| 128 | |
| 129 | def imshow(tensor, title=None): |
| 130 | image = tensor.cpu().clone() # we clone the tensor to not do changes on it |
| 131 | image = image.squeeze(0) # remove the fake batch dimension |
| 132 | image = unloader(image) |
| 133 | plt.imshow(image) |
| 134 | if title is not None: |
| 135 | plt.title(title) |
| 136 | plt.pause(0.001) # pause a bit so that plots are updated |
| 137 | |
| 138 | |
| 139 | plt.figure() |
no outgoing calls
no test coverage detected