Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About multi-layer forward pass #4

Open
daleigehhh opened this issue Aug 28, 2024 · 0 comments
Open

About multi-layer forward pass #4

daleigehhh opened this issue Aug 28, 2024 · 0 comments

Comments

@daleigehhh
Copy link

Hi, @KimUyen
I am working on a local map prediction problem and I want to use Bi-ConvLSTM to solve my problem.
In your implementation ConvLSTM part, line 238:
ConvLSTM_stacked_forwardpass
## LSTM forward direction input_fw = input_tensor for layer_num in range(self.layer_num): h, c = hidden_states[layer_num] output_inner = [] for t in range(seq_len): h, c = self.cells_fw[layer_num](input_tensor=input_fw[:, t, :, :, :], cur_state=[h, c]) output_inner.append(h) layer_output = torch.stack(output_inner, dim=1) layer_outputs_fw.append(layer_output) layer_outputs = torch.stack(layer_outputs_fw, dim=1) last_state_fw = [h, c]
why the input of every layer is the same, I thought it should be the hidden state of the last layer, am I right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant