class_docstr: Deep & Cross Network replaces the wide part in Wide&Deep with cross network,
  automatically construct limited high-degree cross features, and learns the corresponding weights.
class_docstr_tok: ["Deep","&","Cross","Network","replaces","the","wide","part","in","Wide","&","Deep","with","cross","network",",","automatically","construct","limited","high-degree","cross","features",",","and","learns","the","corresponding","weights","."]
code: def forward(self, interaction):
      dcn_all_embeddings = self.concat_embed_input_fields(
          interaction
      )  # [batch_size, num_field, embed_dim]
      batch_size = dcn_all_embeddings.shape[0]
      dcn_all_embeddings = dcn_all_embeddings.view(batch_size, -1)
  
      # DNN
      deep_output = self.mlp_layers(dcn_all_embeddings)
      # Cross Network
      cross_output = self.cross_network(dcn_all_embeddings)
      stack = torch.cat([cross_output, deep_output], dim=-1)
      output = self.predict_layer(stack)
  
      return output.squeeze(1)
  
file_path: RecBole/recbole/model/context_aware_recommender/dcn.py
imports: import torch
  import torch.nn
  from torch.nn.init import xavier_normal_, constant_
  from recbole.model.abstract_recommender import ContextRecommender
  from recbole.model.layers import MLPLayers
  from recbole.model.loss import RegLoss
label_desc: Use image node_id 4 for calling the DCN obj's underlying member method code with example usage: obj.forward(interaction) and returns: output