src/transformers/models/blenderbot/modeling_tf_blenderbot.py/TFBlenderbotMainLayer/__init__
class TFBlenderbotMainLayer:    def __init__(self, config: BlenderbotConfig, **kwargs):
        super().__init__(**kwargs)

        self.config = config
        self.shared = TFSharedEmbeddings(config.vocab_size, config.d_model, config.pad_token_id, name="model.shared")

        with tf.compat.v1.variable_scope("model.shared") as shared_abs_scope_name:
            pass

        # Wraps layer to avoid problems with weight restoring and ensuring we're in the correct TF scope.
        embed_tokens = TFWrappedEmbeddings(self.shared, abs_scope_name=shared_abs_scope_name)
        embed_tokens.vocab_size = self.shared.vocab_size
        embed_tokens.hidden_size = self.shared.hidden_size

        self.encoder = TFBlenderbotEncoder(config, embed_tokens, name="encoder")
        self.decoder = TFBlenderbotDecoder(config, embed_tokens, name="decoder")