Skip to content

Commit

Permalink
tidy matrix display
Browse files Browse the repository at this point in the history
  • Loading branch information
leej3 committed Jun 22, 2024
1 parent 2f5833c commit 1e37dce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ignite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def format_item(item: Any, prefix: str = "") -> Optional[str]:
elif item.dim() == 1:
return f"{prefix}[" + ", ".join(f"{x.item():.4f}" for x in item) + "]"
else:
return f"{prefix}Shape: {item.shape}"
return f"{prefix} {list(item.shape)}"
elif isinstance(item, dict):
for key, value in item.items():
formatted_value = format_item(value, f"{key}: ")
Expand Down

0 comments on commit 1e37dce

Please sign in to comment.