kenshohara / 3D-ResNets-PyTorch

3D ResNets for Action Recognition (CVPR 2018)
MIT License
3.84k stars 930 forks source link

error : expected tensor as element 0 in argument 0 #281

Open sebyo opened 9 months ago

sebyo commented 9 months ago

I tried to execute the script without the spatial transform (set it to None ) and I got the above error ? the problem is in the loading function in videodataset.py

`def __loading(self, path, frame_indices):

     clip = self.loader(path, frame_indices)

     if self.spatial_transform is not None:

         self.spatial_transform.randomize_parameters()

         clip = [self.spatial_transform(img) for img in clip]

     clip = torch.stack(clip, 0).permute(1, 0, 2, 3)

    return clip`

any suggestion how can I work if I don't want to use the data transformations provided here