I will show my code :
#####################------------1------------#####################
init():
self.LSTM_audio = nn.LSTM(Audio_dim, Audio_dim, 1, batch_first=True, bidirectional=False)
h0c0_audio = (Variable(torch.zeros(1, self.batch_size, self.Audio_dim).cuda()),
Variable(torch.zeros(1, self.batch_size, self.Audio_dim).cuda()))
forward():
out_audio, (hn_a,cn_a) = self.LSTM_audio( audio, h0c0_audio )
#####################------------2------------#####################
init():
LSTM = nn.LSTM( Mat_size, hidden_size, 1, batch_first=True, bidirectional=False )
states = (Variable(torch.zeros(1, self.batch_size, self.hidden_size).cuda()),
Variable(torch.zeros(1, self.batch_size, self.hidden_size).cuda()))
hiddens = Variable(torch.zeros(self.batch_size, self.seq_len, self.hidden_size).cuda())
forward():
for time_step in range( self.seq_len ):
data_seq = x_t[ :, time_step, : ]
data_seq = data_seq.unsqueeze( 1 )
out, self.states = self.LSTM( data_seq, self.states )
hiddens[ :, time_step, : ] = out
Question: I find the value of  "out_audio in 1 " and "hiddens of 2 " are different .I am very confused