ValueError: Input 0 of layer encoder_1 is incompatible with the layer: expected ndim=3, found ndim=2
对于这个问题LSTM requires an input of shape [ batch , timesteps , feature ]. Meaning it requires input to have ndim=3 and your X and y` have ndim=2将输入数据调整成三维即可