This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Description
As of right now, we are not supporting empty tensors in nested tensor when calling to_tensor_mask() method.
Example case:
nt1 = nt.nested_tensor([
nt.nested_tensor([
nt.nested_tensor([
torch.tensor([], dtype=torch.float)
]),
nt.nested_tensor([
torch.tensor([1], dtype=torch.float),
torch.tensor([1], dtype=torch.float)
]),
nt.nested_tensor([
torch.tensor([2, 3], dtype=torch.float)
]),
])
])
It's unclear what the result should look like for this nested tensors.
Possible solutions to this problem is to introduce nested_size flag for nested_tensor_from_tensor_mask() method but we need more info to come up with the best solution.