src/transformers/models/tapas/modeling_tf_tapas.py/TFTapasLayer/__init__
class TFTapasLayer:    def __init__(self, config: TapasConfig, **kwargs):
        super().__init__(**kwargs)

        self.attention = TFTapasAttention(config, name="attention")
        self.is_decoder = config.is_decoder
        self.add_cross_attention = config.add_cross_attention
        if self.add_cross_attention:
            if not self.is_decoder:
                raise ValueError(f"{self} should be used as a decoder model if cross attention is added")
            self.crossattention = TFTapasAttention(config, name="crossattention")
        self.intermediate = TFTapasIntermediate(config, name="intermediate")
        self.bert_output = TFTapasOutput(config, name="output")