This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Quantized multi head attention layer.""" | |
import math | |
import tensorflow as tf | |
from google3.third_party.tensorflow.python.ops import array_ops | |
from google3.third_party.tensorflow.python.ops import math_ops | |
from google3.third_party.tensorflow.python.ops import special_math_ops | |
from google3.third_party.tensorflow_models.official.projects.qat.nlp.quantization import helper |