Skip to content

Commit

Permalink
FIx second stacking variable length tensors occurance
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Beitner committed Oct 17, 2020
1 parent 0d299c1 commit 7930b9a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ def _log_interpretation(self, outputs, label="train"):
# log lengths of encoder/decoder
for type in ["encoder", "decoder"]:
fig, ax = plt.subplots()
lengths = torch.stack([out["interpretation"][f"{type}_length_histogram"] for out in outputs]).sum(0).cpu()
lengths = padded_stack([out["interpretation"][f"{type}_length_histogram"] for out in outputs]).sum(0).cpu()
if type == "decoder":
start = 1
else:
Expand Down

0 comments on commit 7930b9a

Please sign in to comment.