Chinese core paper: VMD-LSTM-Attention time series price prediction practical complete code data can be run directly

Project video explanation: VMD-Attention-LSTM time series price prediction actual complete data code can be run directly_bilibili_bilibili

Model diagram:

Data display: tens of thousands of data are enough

Main model code:

import tensorflow as tf

def attention_3d_block(inputs,TIME_STEPS,SINGLE_ATTENTION_VECTOR):
    # inputs.shape = (batch_size, time_steps, input_dim)
    # inputs = tf.expand_dims(inputs,1)
    input_dim = int(inputs.shape[2])
    a = tf.keras.layers.Permute((2, 1))(inputs)
    a = tf.keras.layers.Reshape((input_dim, TIME_STEPS))(a)  # this line is not useful. It's just to kn

Guess you like

Origin blog.csdn.net/pythonyanyan/article/details/134686887