[BUG] pad_sequence
with return_mask=True
depends on padding_value
(incorrect behavior for torch.nan
)
#1183
Labels
bug
Something isn't working
Describe the bug
pad_sequence
, called withpadding_value=torch.nan
andreturn_mask=True
, createsmasks
in the output tensordict withTrue
-values only, even if there are non-valid entries in the padded tensordict.To Reproduce
prints
tensor(True)
andtensor(False)
Expected behavior
I expect
tensor(False)
to be printed in both cases.The text was updated successfully, but these errors were encountered: