(imgs,epoch,step)
| 63 | plt.savefig('logs/figure.png') |
| 64 | |
| 65 | def save_images(imgs,epoch,step): |
| 66 | imgs = imgs.detach().cpu().numpy() |
| 67 | imgs = np.squeeze(imgs) |
| 68 | fig = plt.figure(figsize=(2,2)) |
| 69 | for i in range(4): |
| 70 | plt.subplot(2,2,i + 1) |
| 71 | plt.imshow((imgs[i] + 1) / 2) |
| 72 | plt.axis("off") |
| 73 | plt.savefig(os.path.join(config.SAVE_IMAGES,str(epoch)+"_"+str(step)+'.png')) |
| 74 | print("\n================================>Saving images...") |
| 75 | |
| 76 | def plot_predictions(y_true,y_pred,step,epoch): |
| 77 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected