(img)
| 310 | |
| 311 | # convert torch tensor to single |
| 312 | def tensor2single(img): |
| 313 | img = img.data.squeeze().float().cpu().numpy() |
| 314 | if img.ndim == 3: |
| 315 | img = np.transpose(img, (1, 2, 0)) |
| 316 | |
| 317 | return img |
| 318 | |
| 319 | # convert torch tensor to single |
| 320 | def tensor2single3(img): |
nothing calls this directly
no outgoing calls
no test coverage detected