transformers4rec.tf.layers package
Submodules
transformers4rec.tf.layers.interaction module
transformers4rec.tf.layers.outer_product module
- 
class transformers4rec.tf.layers.outer_product.XDeepFmOuterProduct(*args, **kwargs)[source]
- Bases: - keras.engine.base_layer.Layer- Layer implementing the outer product transformation used in the Compressed Interaction Network (CIN) proposed in in https://arxiv.org/abs/1803.05170. Treats the feature dimension H_k of a B x H_k x D feature embedding tensor as a feature map of the D embedding elements, and computes element-wise multiplication interaction between these maps and those from an initial input tensor x_0 before taking the inner product with a parameter matrix. - Parameters
- dim (int) – Feature dimension of the layer. Output will be of shape (batch_size, dim, embedding_dim) 
 
Module contents
- 
class transformers4rec.tf.layers.DotProductInteraction(*args, **kwargs)[source]
- Bases: - keras.engine.base_layer.Layer
- 
class transformers4rec.tf.layers.XDeepFmOuterProduct(*args, **kwargs)[source]
- Bases: - keras.engine.base_layer.Layer- Layer implementing the outer product transformation used in the Compressed Interaction Network (CIN) proposed in in https://arxiv.org/abs/1803.05170. Treats the feature dimension H_k of a B x H_k x D feature embedding tensor as a feature map of the D embedding elements, and computes element-wise multiplication interaction between these maps and those from an initial input tensor x_0 before taking the inner product with a parameter matrix. - Parameters
- dim (int) – Feature dimension of the layer. Output will be of shape (batch_size, dim, embedding_dim)