Imshow for Tensor.
(inp, title)
| 43 | |
| 44 | |
| 45 | def imshow(inp, title): |
| 46 | """Imshow for Tensor.""" |
| 47 | inp = inp.numpy().transpose((1, 2, 0)) |
| 48 | inp = std * inp + mean |
| 49 | inp = np.clip(inp, 0, 1) |
| 50 | plt.imshow(inp) |
| 51 | plt.title(title) |
| 52 | plt.show() |
| 53 | |
| 54 | |
| 55 | # Get a batch of training data |
no outgoing calls
no test coverage detected