Skip to content

Commit

Permalink
Fix interaction cat check for torch>=0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
a8f committed Nov 10, 2021
1 parent 3334c4b commit 5c41a74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion egg/core/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _check_cat(lst):
"Appending empty and non-empty interactions logs. "
"Normally this shouldn't happen!"
)
return torch.cat(lst, dim=0)
return torch.cat([t.unsqueeze(0) for t in lst], dim=0)

assert interactions, "interaction list must not be empty"
has_aux_input = interactions[0].aux_input is not None
Expand Down

1 comment on commit 5c41a74

@a8f
Copy link
Owner Author

@a8f a8f commented on 5c41a74 Nov 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.