(tensor)
| 430 | return new_state_dict |
| 431 | |
| 432 | def tensor2image(tensor): |
| 433 | image = tensor.detach().cpu().numpy() |
| 434 | image = image*255. |
| 435 | image = np.maximum(np.minimum(image, 255), 0) |
| 436 | image = image.transpose(1,2,0)[:,:,[2,1,0]] |
| 437 | return image.astype(np.uint8).copy() |
| 438 | |
| 439 | def load_config(cfg_file): |
| 440 | import yaml |
nothing calls this directly
no outgoing calls
no test coverage detected