MCPcopy Create free account
hub / github.com/google-research/language / _spans_given_width

Function _spans_given_width

language/orqa/models/orqa_model.py:56–59  ·  view source on GitHub ↗
(width)

Source from the content-addressed store, hash-verified

54 """
55 _, max_sequence_len = tensor_utils.shape(masks)
56 def _spans_given_width(width):
57 current_starts = tf.range(max_sequence_len - width + 1)
58 current_ends = tf.range(width - 1, max_sequence_len)
59 return current_starts, current_ends
60
61 starts, ends = zip(*(_spans_given_width(w + 1)
62 for w in range(max_span_width)))

Callers 1

span_candidatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…