(state)
| 16 | return th.mean(x, dim=list(range(1, len(x.size())))) |
| 17 | |
| 18 | def log_state(state): |
| 19 | result = [] |
| 20 | |
| 21 | sorted_state = dict(sorted(state.items())) |
| 22 | for key, value in sorted_state.items(): |
| 23 | # Check if the value is an instance of a class |
| 24 | if "<object" in str(value) or "object at" in str(value): |
| 25 | result.append(f"{key}: [{value.__class__.__name__}]") |
| 26 | else: |
| 27 | result.append(f"{key}: {value}") |
| 28 | |
| 29 | return '\n'.join(result) |
nothing calls this directly
no outgoing calls
no test coverage detected