agethen / ConvLSTM-for-Caffe

28 stars 15 forks source link

How to use ConvLstm for One - dimensional time series signal prediction? #7

Open cuiyi129 opened 7 years ago

cuiyi129 commented 7 years ago

Hi. I wonder can I use the ConvLstm for One - dimensional time series signal prediction?For example: using the U[k-l],......,U[k-2],U[k-1],U[k] to predict U[k+1], among them U[i] are all time series signal . If it can,how should I Preprocess the data? Thanks

agethen commented 7 years ago

Hi, to make sure I understand this: You have T timesteps, and the input data has spatial dimensions 1xW (or Hx1 for that matter)? If that is correct, I believe it should work. You would just specify kernel_w and kernel_h inside the convolution specification (instead of kernel).

Your data needs to be shaped TxBxCxHxW. So, for example: 10x1x1x1x32 would be a valid shape. You can just use a Reshape layer for that :)

If what you want however is a convolution over the time axis, then you need to get a 3D-Convolution (which I am not sure whether it is implemented in Caffe).