MCPcopy Create free account
hub / github.com/YunwenTechnology/QueryGeneration / get_attention_mask

Function get_attention_mask

train/utils.py:132–140  ·  view source on GitHub ↗

this is a TPU compatible version of tf.matrix_band_part(tf.ones([nd, ns]), -1, ns-nd) where the lower right triangle contains 1s

(nd, ns, *, dtype)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected