You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the TermEncoder class, the hidden_states dictionary is declared at line 148 hidden_states = {} # node -> hidden state,
accessed at line 168 h = hidden_states[c],
and initialized at line 185 hidden_states[node] = hiddens[i].
I seem to be getting at error because hidden_states is empty when the code tries to access it at line 168.
The text was updated successfully, but these errors were encountered:
Therefore, hidden_states should have been initialized when it is accessed. For each node, we always access the hidden_states of its children, which are already initialized because we go from bottom to up.
Feel free to let me know if you have further questions.
In the TermEncoder class, the hidden_states dictionary is declared at line 148
hidden_states = {} # node -> hidden state
,accessed at line 168
h = hidden_states[c]
,and initialized at line 185
hidden_states[node] = hiddens[i]
.I seem to be getting at error because hidden_states is empty when the code tries to access it at line 168.
The text was updated successfully, but these errors were encountered: