Skip to content

Commit

Permalink
Merge pull request #109 from jdb78/fix/stack_variable_lengths_tensors
Browse files Browse the repository at this point in the history
FIx second stacking variable length tensors occurance
  • Loading branch information
jdb78 authored Oct 17, 2020
2 parents c3992ee + 7930b9a commit aa4f0d9
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 aa4f0d9

Please sign in to comment.