I have to apply the following operations on a video (frame-wise)
- RGB to grayscale
- Center Crop
- Color Normalize
- Give the video (the sequence of the frames) as input to a model.
There is another problem though. The model expects an input of the shape (1, #frames, height, width) whereas the above operations expect the shape (#frames, #channels, height, width). So I need to apply
reshape() operation, due to which I am unable to compute the gradients. Kindly provide me with a workaround or point out what am I doing wrong.