Feeding a video to Conv3D

I have a conv3d layer as:

m = nn.Conv3d(16, 33, 3, stride=2)

I know how to feed a tensor like:

input = torch.randn(20, 16, 10, 50, 100)
output = m(input)

But how do I feed a video file to this layer?

Thanks!

1 Like