(tensor, name)
| 38 | print(f"{prefix}: {torch.cuda.max_memory_allocated(device) // 1e6}MB ") |
| 39 | |
| 40 | def anal_tensor(tensor, name): |
| 41 | sent = f" name: {name} mean: {tensor.mean().item()} std: {tensor.std().item()} min: {tensor.min().item()} max: {tensor.max().item()}" |
| 42 | print(sent) |
| 43 | |
| 44 | |
| 45 | def split(lst, split_nbr): |