(img)
| 111 | return real_lab - fake_lab |
| 112 | |
| 113 | def tensor2uint(img): |
| 114 | img = img.data.squeeze().float().clamp_(0, 1).cpu().numpy() |
| 115 | if img.ndim == 3: |
| 116 | img = np.transpose(img, (1, 2, 0)) |
| 117 | return np.uint8((img*255.0).round()) |
| 118 | |
| 119 | def imsave(img, img_path): |
| 120 | img = np.squeeze(img) |
nothing calls this directly
no outgoing calls
no test coverage detected