batch_size, input_size)# 定义双向LSTM模型lstm=nn.LSTM(input_size, hidden_size, num_layers,bidirectional=True)# 前向传播output,(hidden, cell)=lstm(X)# 输出形状应该是 (seq_len, batch, 2 * hidden_size)print(output.shape