(img)
| 300 | |
| 301 | # convert single (HxWxC) to 3-dimensional torch tensor |
| 302 | def single2tensor3(img): |
| 303 | return torch.from_numpy(np.ascontiguousarray(img)).permute(2, 0, 1).float() |
| 304 | |
| 305 | |
| 306 | # convert single (HxWxC) to 4-dimensional torch tensor |
nothing calls this directly
no outgoing calls
no test coverage detected