Thank you very much for your reply, and I have benefited from the questions you have raised. I can use theano to implement lstm and sfm, and do not need to use keras. The sfm is actually a lstm process with the addition of Fourier transform. But how to include the API and how it works in pymc3 is really worth pondering. I will continue to study, I will inform you if there is any progress.