Graph-convolutional
Graph-convolutional copied to clipboard
Potential bugs
@kdrivas Hi,
Thanks for sharing your great work. As I dive into the details of the code, I seem to find some potential issues or bugs for which I want to hear your opinion.
-
issue in
graph.pyPlease check >>here<< for more details. I confidently think it should be modified intoin_gate = (first_in_gate + second_in_gate).view((batch_size, seq_len, 1)). -
issue when building adjacent info in
data.py. See these lines of code to remind you up. Why did you usetmp[a]instead oftmp[arc_1]? I am a little bit confused about this. -
The adjacency_matrix is not consistent with the input and target sequence in a mini-batch. Check >>here<<. I somewhat confidently think the revisited version should be as follows:
if return_dep_tree:
seq_pairs = sorted(zip(input_seqs, target_seqs, arr_aux), key=lambda p: len(p[0]), reverse=True)
input_seqs, target_seqs, arr_aux = zip(*seq_pairs)
arr_aux = arr_dep[pos:cant + pos] # .tolist()
else:
seq_pairs = sorted(zip(input_seqs, target_seqs), key=lambda p: len(p[0]), reverse=True)
input_seqs, target_seqs = zip(*seq_pairs)