I am not familiar with ResNet3D , but if it has 3D convolutions, then the input to the network should be in the shape - [batch, num_channels, num_frames/depth, H, W]
that is the shape that would get loaded with my dataloader. I am not so familiar with DatasetFolder.
If this is the shape getting loaded, then you are good to go