I am also interested in this. It’s not entirely clear to me what they are doing, but that’s what I found.
The document is here , and it is implemented as a class called _EmbeddingColumn, which is a subclass of _FeatureColumn. It stores the embedding matrix inside the sparse_id_column attribute. The to_dnn_input_layer method then applies this embed matrix to create attachments for the next layer.
def to_dnn_input_layer(self, input_tensor, weight_collections=None, trainable=True): output, embedding_weights = _create_embedding_lookup( input_tensor=self.sparse_id_column.id_tensor(input_tensor), weight_tensor=self.sparse_id_column.weight_tensor(input_tensor), vocab_size=self.length, dimension=self.dimension, weight_collections=_add_variable_collection(weight_collections), initializer=self.initializer, combiner=self.combiner, trainable=trainable)
So, as far as I can see, it seems that the investments are formed by applying any training rule used (gradient descent, etc.) to the implementation matrix.
source share