Example #1
0
 def __init__(self, config):
     super(FastAttention, self).__init__()
     self.self = FastSelfAttention(config)
     self.output = BertSelfOutput(config)
Example #2
0
 def __init__(self, config):
     super(CaptionBertAttention, self).__init__(config)
     self.self = CaptionBertSelfAttention(config)
     self.output = BertSelfOutput(config)
     self.config = config
Example #3
0
 def __init__(self, config):
     super(EntityAwareAttention, self).__init__()
     self.self = EntityAwareSelfAttention(config)
     self.output = BertSelfOutput(config)
Example #4
0
 def __init__(self, config):
     super().__init__()
     self.self = TTASelfAttention(config)
     self.output = BertSelfOutput(config)
     self.pruned_heads = set()