Hi!
I’m struggling with a video tensor in pytorch. I want to make some filtering on it for preparation.  I’m uncertain which shape I should use for the video. Currently I use shape: [frames, colors, height, width]
e.g. rgb: [50, 3, 1080, 1920] or for gray [50, 1, 1080, 1920]
To prepare the video I would like to do some filtering/convolution.
I would like to do some 2d-convolution separate for each frame and color channel.
I tried torch.nn.functional Conv3d and Conv2d and different weights.
If I try conv2d(video, filter, stride=1, bias=None,  padding=1)
video having shape gray [50, 1, 1080, 1920]
filter: [[ 0.0000,  0.5000,  0.0000],
[ 0.0000, -1.0000,  0.0000],
[ 0.0000,  0.5000,  0.0000]]
And get.RuntimeError: weight should have at least three dimensions
If i unsqeese(filter,0) I get:
RuntimeError: expected stride to be a single integer value or a list of 1 values to match the convolution dimensions, but got stride=[1, 1]
Could anyone show me how I should do it?
Thanks!
Best regards
Anders