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

In the code, are the cell state and hidden state concatenated? #10

Open
zehuanzhang opened this issue Jul 1, 2021 · 1 comment
Open

Comments

@zehuanzhang
Copy link

In the GeoMAN.py, Line 262 to Line 273:

multiply attention weights with the original input

local_x = local_attn * local_inp
global_x = global_attn * global_inp

Run the BasicLSTM with the newly input

cell_output, state = cell(tf.concat([local_x, global_x], axis=1), state)

Run the attention mechanism.

with tf.variable_scope('local_spatial_attn'):
local_attn = local_attention(state)
with tf.variable_scope('global_spatial_attn'):
global_attn = global_attention(state)
attn_weights.append((local_attn, global_attn))

Does this only consider cell state when calculating attention? In the paper Equation (1), cell state and hidden state are concatenated?

@CastleLiang
Copy link
Contributor

The variable "state" actually contains both the cell state and the hidden state.

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

2 participants