Open mariosasko opened 2 years ago
Use torch.nested_tensor for arrays of varying length in TorchFormatter.
torch.nested_tensor
TorchFormatter
The PyTorch API of nested tensors is in the prototype stage, so wait for it to become more mature.
What's the current behavior?
Currently, we return a list of Torch tensors if their shapes don't match. If they do, we consolidate them into a single Torch tensor.
Use
torch.nested_tensor
for arrays of varying length inTorchFormatter
.The PyTorch API of nested tensors is in the prototype stage, so wait for it to become more mature.