(inp, target)
| 81 | return ret |
| 82 | |
| 83 | def convert_like(inp, target): |
| 84 | if isinstance(target, np.ndarray): |
| 85 | return convert_to_np(inp) |
| 86 | elif isinstance(target, torch.Tensor): |
| 87 | inp = convert_to_tensor(inp) |
| 88 | inp = inp.to() |
| 89 | if target.device == 'cpu': |
| 90 | return move_to_cpu(inp) |
| 91 | else: |
| 92 | return move_to_cuda(inp) |
| 93 | |
| 94 | def move_to_cpu(tensors): |
| 95 | ret = {} |
nothing calls this directly
no test coverage detected