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
There is nothing wrong with the author's code:
src_padding_mask = h_node.data.new(num_batch, max_num_nodes).fill_(0).bool()
src_padding_mask[i, : max_num_nodes - num_node] = True
Notice that padded_h_node's shape is (S, B, h_d), and S is divided into padding_node_size and graph_node_size (graph_node is in the back because it is easy to add 'cls' token).
Hi,
Thanks for your excellent work.
I found the implementation of padding a batch in your code is confusing. The code for batch is:
I think the line "src_padding_mask[i, : max_num_nodes - num_node] = True" for masking might should be:
Because in the pooling part, the original code can cause the denominator of the this line as 0:
The text was updated successfully, but these errors were encountered: