class_docstr: The convolutional layer of CGCNN.
  
  This class was implemented using DGLGraph methods.
  Please confirm how to use DGLGraph methods from below link.
  See: https://docs.dgl.ai/en/0.4.x/tutorials/models/1_gnn/9_gat.html
  
  Examples
  --------
  >>> import deepchem as dc
  >>> from pymatgen.core import Lattice, Structure
  >>> lattice = Lattice.cubic(4.2)
  >>> structure = Structure(lattice, ["Cs", "Cl"], [[0, 0, 0], [0.5, 0.5, 0.5]])
  >>> featurizer = dc.feat.CGCNNFeaturizer()
  >>> cgcnn_graph = featurizer.featurize([structure])[0]
  >>> cgcnn_graph.num_node_features
  92
  >>> cgcnn_graph.num_edge_features
  41
  >>> cgcnn_dgl_graph = cgcnn_graph.to_dgl_graph()
  >>> print(type(cgcnn_dgl_graph))
  <class 'dgl.heterograph.DGLGraph'>
  >>> layer = CGCNNLayer(hidden_node_dim=92, edge_dim=41)
  >>> node_feats = cgcnn_dgl_graph.ndata.pop('x')
  >>> edge_feats = cgcnn_dgl_graph.edata.pop('edge_attr')
  >>> new_node_feats, new_edge_feats = layer(cgcnn_dgl_graph, node_feats, edge_feats)
  
  Notes
  -----
  This class requires DGL and PyTorch to be installed.
class_docstr_tok: ["The","convolutional","layer","of","CGCNN",".","This","class","was","implemented","using","DGLGraph","methods",".","Please","confirm","how","to","use","DGLGraph","methods","from","below","link",".","See",":","https",":","\/\/docs.dgl.ai\/en\/0.4.x\/tutorials\/models\/1_gnn\/9_gat.html","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","from","pymatgen.core","import","Lattice",",","Structure",">",">",">","lattice","=","Lattice.cubic","(","4.2",")",">",">",">","structure","=","Structure","(","lattice",",","[","``","Cs","''",",","``","Cl","''","]",",","[","[","0",",","0",",","0","]",",","[","0.5",",","0.5",",","0.5","]","]",")",">",">",">","featurizer","=","dc.feat.CGCNNFeaturizer","(",")",">",">",">","cgcnn_graph","=","featurizer.featurize","(","[","structure","]",")","[","0","]",">",">",">","cgcnn_graph.num_node_features","92",">",">",">","cgcnn_graph.num_edge_features","41",">",">",">","cgcnn_dgl_graph","=","cgcnn_graph.to_dgl_graph","(",")",">",">",">","print","(","type","(","cgcnn_dgl_graph",")",")","<","class","'dgl.heterograph.DGLGraph","'",">",">",">",">","layer","=","CGCNNLayer","(","hidden_node_dim=92",",","edge_dim=41",")",">",">",">","node_feats","=","cgcnn_dgl_graph.ndata.pop","(","'","x","'",")",">",">",">","edge_feats","=","cgcnn_dgl_graph.edata.pop","(","'edge_attr","'",")",">",">",">","new_node_feats",",","new_edge_feats","=","layer","(","cgcnn_dgl_graph",",","node_feats",",","edge_feats",")","Notes","--","--","-","This","class","requires","DGL","and","PyTorch","to","be","installed","."]
code: def reduce_func(self, nodes):
      nbr_sumed = torch.sum(nodes.mailbox["message"], dim=1)
      new_x = F.softplus(nodes.data["x"] + nbr_sumed)
      return {"new_x": new_x}
  
file_path: deepchem/deepchem/models/torch_models/cgcnn.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from deepchem.models.losses import Loss, L2Loss, SparseSoftmaxCrossEntropy
  from deepchem.models.torch_models.torch_model import TorchModel
label_desc: Use image node_id 3 for calling the CGCNNLayer obj's underlying member method code with example usage: obj.reduce_func(nodes) and returns: dict