You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def _maybe_compute_length_per_key(
keys: List[str],
stride: int,
length_per_key: Optional[List[int]],
lengths: Optional[torch.Tensor],
offsets: Optional[torch.Tensor],
) -> List[int]:
if length_per_key is None:
if len(keys) and offsets is not None and len(offsets) > 0:
_length: List[int] = torch.sum(
torch.diff(offsets).view(-1, stride), dim=1
).tolist()
elif len(keys) and lengths is not None:
_length: List[int] = (
Hello, I generated the KJT with lengths is a tensor with full of 1s. then I get an error as:
keys = ['f0', 'f1', 'f2', 'f3', 'f4', 'f5', ...], stride = 105, length_per_key = None, lengths = tensor([1, 1, 1, ..., 1, 1, 1], device='cuda:0'), offsets = None
E RuntimeError: shape '[-1, 105]' is invalid for input of size 2114
../../../../../miniconda3/envs/pr-gpu/lib/python3.8/site-packages/torchrec/sparse/jagged_tensor.py:523: RuntimeError
The text was updated successfully, but these errors were encountered: