I get this error ValueError: size shape must match input shape. Input is 1D, size is 2
for when I apply transform of resize 2D on a 2D feature. However, I am not fully sure why it tells me my feature is 1D? What do you think?
features is: torch.Size([503, 512])
  transformed_features = self.transform(features)
  File "/SeaExp/mona/venv/dpcc/lib/python3.8/site-packages/torchvision/transforms/transforms.py", line 60, in __call__
    img = t(img)
  File "/SeaExp/mona/venv/dpcc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/SeaExp/mona/venv/dpcc/lib/python3.8/site-packages/torchvision/transforms/transforms.py", line 297, in forward
    return F.resize(img, self.size, self.interpolation, self.max_size, self.antialias)
  File "/SeaExp/mona/venv/dpcc/lib/python3.8/site-packages/torchvision/transforms/functional.py", line 403, in resize
    return F_t.resize(img, size=size, interpolation=interpolation.value, max_size=max_size, antialias=antialias)
  File "/SeaExp/mona/venv/dpcc/lib/python3.8/site-packages/torchvision/transforms/functional_tensor.py", line 552, in resize
    img = interpolate(img, size=[new_h, new_w], mode=interpolation, align_corners=align_corners)
  File "/SeaExp/mona/venv/dpcc/lib/python3.8/site-packages/torch/nn/functional.py", line 3630, in interpolate
    raise ValueError(
ValueError: size shape must match input shape. Input is 1D, size is 2

and transforms are:
train_transforms = transforms.Compose(
    [
        transforms.Resize((256, 512)),
        transforms.RandomResizedCrop(256),
        transforms.RandomHorizontalFlip(),
        transforms.ToTensor(),
    ]
)

val_transforms = transforms.Compose(
    [
        transforms.Resize((256, 512)),
        transforms.CenterCrop(256),
        transforms.ToTensor(),
    ]
)

I apply the transform like this:
    dataset_train = GraphDataset(os.path.join(data_path, ""), ids_train, transform=train_transforms)
and I have:
class GraphDataset(data.Dataset):
    """input and label image dataset"""

    def __init__(self, root, ids, target_patch_size=-1, transform=None):
    *code*
    def __getitem__(self, index):
    *code*
     transformed_features = self.transform(features)
     #sample['image'] = features
     sample['image'] = transformed_features
     return sample

I am not precisely sure what I am doing wrong.