Graph-convolutional icon indicating copy to clipboard operation
Graph-convolutional copied to clipboard

Potential bugs

Open LiUzHiAn opened this issue 4 years ago • 0 comments

@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.

  1. issue in graph.py Please check >>here<< for more details. I confidently think it should be modified into in_gate = (first_in_gate + second_in_gate).view((batch_size, seq_len, 1)).

  2. issue when building adjacent info in data.py. See these lines of code to remind you up. Why did you use tmp[a] instead of tmp[arc_1]? I am a little bit confused about this.

  3. 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) 

LiUzHiAn avatar Aug 31 '21 14:08 LiUzHiAn