Format a dictionary for printing.
(d: Dict)
| 92 | |
| 93 | |
| 94 | def formatted_dict(d: Dict) -> Dict: |
| 95 | """Format a dictionary for printing.""" |
| 96 | return {k: (f"{v:.5g}" if type(v) == float else v) for k, v in d.items()} |
| 97 | |
| 98 | |
| 99 | def disable_dropout(model: torch.nn.Module): |