How to deal with Sequential images?

Hello guys, I am tackling a challenge where I have a sequence of images, like in a video (starting from blank i.e all 0s to then having some content and then ending in 0s). For all these images I just have a single label. I wanted to ask, what is a good way to deal with such data? Can I do it like this

for i in all_images:
   y_pred = model.forward(i)
   loss = criterion(y_pred, y)
loss.backward()

Yes, your approach would technically work (just remove the forward call and use model(i) instead).
I don’t know what model you are using, but in case it doesn’t use “states” from previous iterations (e.g. via RNNs), it would not learn any temporal dependency and would treat each input as a new sample.

1 Like

Thank you Peter You have always helped everyone :slight_smile: