A4Bio / SimVP

The official implementation of the CVPR'22 paper SimVP: Simpler Yet Better Video Prediction.
215 stars 40 forks source link

flexible length prediction required #1

Closed bigfeetsmalltone closed 2 years ago

bigfeetsmalltone commented 2 years ago

The SimVP is set to produce a fixed-length sequence prediction whose length is the same as the input sequence's.

gaozhangyang commented 2 years ago

Thanks for your interest in this work. Denote the output length and input length as L_out and L_in respectively. If L_out<L_in, you can clip the output by output[:, :L_out,:,:]; otherwise you can repeatedly treat the output as input to get the future prediction:


cnt = out_length // in_length
cur_seq = batch_x
pred_y = [] 
for patch in range(cnt):
      cur_seq = self.model(cur_seq)
      pred_y.append(cur_seq)
bugsuse commented 2 years ago

@gaozhangyang It's very interesting work! Could you release the example codes on the KTH dataset? This can help in understanding prediction tasks of different input and output lengths. Thanks a lot!