kentonl/e2e-coref

Some comment errors in the source code ??

XiaoQQin opened this issue · 0 comments

I can successfully run the source code. But when I see the code, I meet a problem.
In thecoref_model.pyfile, when getting the k survival top_span_indices,the code is

top_span_indices = coref_ops.extract_spans(tf.expand_dims(candidate_mention_scores, 0),
                                         tf.expand_dims(candidate_starts, 0),
                                         tf.expand_dims(candidate_ends, 0),
                                         tf.expand_dims(k, 0),
                                         util.shape(context_outputs, 0),
                                         True) # [1, k]

the fifth parameter util.shape(context_outputs, 0) is the num_words of document,but In the coref_kernels.cc,the fifth parameter is max_sentence_length. the code in coref_kernels.cc as follow.

 REGISTER_OP("ExtractSpans")
 .Input("span_scores: float32")
 .Input("candidate_starts: int32")
 .Input("candidate_ends: int32")
 .Input("num_output_spans: int32")
 .Input("max_sentence_length: int32")  // the max_sentence_length ???
 .Attr("sort_spans: bool")
 .Output("output_span_indices: int32");