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
random_split fills indices variable using torch.randperm function, which returns tensor. Through Subset class its values goes to Dataset.getitem. If I override getitem, tensor values are ok for indexing list, but with pandas DataFrame it raises TypeError. Maybe it would be better to convert indices to list variable at start.
Issue description
random_split fills indices variable using torch.randperm function, which returns tensor. Through Subset class its values goes to Dataset.getitem. If I override getitem, tensor values are ok for indexing list, but with pandas DataFrame it raises TypeError. Maybe it would be better to convert indices to list variable at start.
Code example
df = pd.DataFrame([1, 2])
tn = torch.tensor([0, 1])
df.iloc[tn[0]]
...
...
TypeError: len() of unsized object
The text was updated successfully, but these errors were encountered: